Returns if this page should be shown in menus

Category_Generators can change that dynamically using the hide column,
other generators have a 'showInMenu' setting (defaults to false)

@return bool
540979
public function isShownInMenu()
    {
        if (!$this->isPage) return false;
        if ($this->generator instanceof Kwc_Root_Category_Generator) {
            //it's not worth for this single special case to add a generator method, but should be done if other special cases are needed
            return !$this->row->hide;
        } else {
            if (!$this->generator->hasSetting('showInMenu')) return false;
            return (bool)$this->generator->getSetting('showInMenu');
        }
    }
853839
public function isSelected()
  {
    if (Navigation::clearQueryArg(Request::getArgumentValue('q')) == Navigation::clearQueryArg($this->urlCode)) {
      return true;
    }
    return false;
  }
161931
public function refreshMenu() {
		$data = $this->getMenu();
		if($data && isset($data['menu']) && isset($data['menu']['button'])) {
			WechatMenu::deleteAll(['appid' => $this->app->appid]);
			WechatMenu::addMenu($this->app->appid, $data['menu']['button'], isset($data['menu']['menuid']) ? $data['menu']['menuid'] : null);
			if(isset($data['conditionalmenu'])) {
				foreach($data['conditionalmenu'] as $conditionalmenu) {
					WechatMenu::addMenu($this->app->appid, $conditionalmenu['button'], $conditionalmenu['menuid'], $conditionalmenu['matchrule']);
				}
			}

			return true;
		}

		return false;
	}
612145
public function actionManage($category=null) 
	{
		$pageTitle = Yii::t('phrase', 'Menus');
		if($category != null) {
			$data = OmmuMenuCategory::model()->findByPk($category);
			$pageTitle = Yii::t('phrase', 'Menus: category $category_name', array ('$category_name'=>$data->title->message));
		}
		
		$model=new OmmuMenus('search');
		$model->unsetAttributes();	// clear any default values
		if(isset($_GET['OmmuMenus'])) {
			$model->attributes=$_GET['OmmuMenus'];
		}

		$columns = $model->getGridColumn($this->gridColumnTemp());

		$this->pageTitle = $pageTitle;
		$this->pageDescription = '';
		$this->pageMeta = '';
		$this->render('admin_manage', array(
			'model'=>$model,
			'columns' => $columns,
		));
	}
991010
public function shouldDisplay(): bool
    {
        if ($this->before || $this->after) {
            return true;
        }

        return (bool) count($this->children);
    }
828184
public static function is_menu_icons_disabled_for_menu( $menu_id = 0 ) {
		if ( empty( $menu_id ) ) {
			$menu_id = self::get_current_menu_id();
		}

		// When we're creating a new menu or the recently edited menu
		// could not be found.
		if ( empty( $menu_id ) ) {
			return true;
		}

		$menu_settings = self::get_menu_settings( $menu_id );
		$is_disabled   = ! empty( $menu_settings['disabled'] );

		return $is_disabled;
	}
1032246
public function isDisabled()
    {
        // Obtain Current Page (with crumbs enabled):
        
        if (($page = $this->getCurrentPage(Page::class)) && !$page->CrumbsDisabled) {
            
            // Disable for Top-Level (if required):
            
            if ($this->HideTopLevel && $this->getCrumbsCount() == 1) {
                return true;
            }
            
            // Answer from Parent:
            
            return parent::isDisabled();
            
        }
        
        // Disable (by default):
        
        return true;
    }
631410
def link_page_is_suitable_for_display(
        self, request=None, current_site=None, menu_instance=None,
        original_menu_tag=''
    ):
        
        if self.link_page:
            if(
                not self.link_page.show_in_menus or
                not self.link_page.live or
                self.link_page.expired
            ):
                return False
        return True
825149
public function shouldBeIncluded($item)
    {
        if (!is_object($item)) {
            return false;
        }

        $pageId = $this->getPageId($item);
        $showInMenu = get_field('hide_in_menu', $pageId) ? !get_field('hide_in_menu', $pageId) : true;
        $isNotTopLevelItem = !($item->post_type === 'page' && isset($item->post_parent) && $item->post_parent === 0);
        $showTopLevel = $this->args['include_top_level'];

        return ($showTopLevel || $isNotTopLevelItem) && $showInMenu;
    }
774780
public function setToggleVisibilityAction()
    {
        // Check current user authorization
        if (null !== $response = $this->checkAuth($this->resourceCode, array(), AccessManager::UPDATE)) {
            return $response;
        }

        $event = new CategoryToggleVisibilityEvent($this->getExistingObject());

        try {
            $this->dispatch(TheliaEvents::CATEGORY_TOGGLE_VISIBILITY, $event);
        } catch (\Exception $ex) {
            // Any error
            return $this->errorPage($ex);
        }

        // Ajax response -> no action
        return $this->nullResponse();
    }
1366584
protected function checkConfiguration()
    {
        return $this->getSelectSource()
            && $this->getValueColumn()
            && $this->getAliasColumn()
            && $this->getIdColumn()
            && $this->getSortingColumn();
    }
649023
public function hasVisibleSubCats()
    {
        if ($this->_blHasVisibleSubCats === null) {
            $this->_blHasVisibleSubCats = false;
            if ($activeCategory = $this->getActiveCategory()) {
                $this->_blHasVisibleSubCats = $activeCategory->getHasVisibleSubCats();
            }
        }

        return $this->_blHasVisibleSubCats;
    }
1130609
public function Anchor(){
        if ($this->MenuTitle && $this->ShowInMenus) {
            return strtolower(trim(preg_replace('/[^a-zA-Z0-9]+/', '-',$this->MenuTitle), '-'));
        }
        return false;
    }
1243644
public function hasContent() {

    if (count($this->getCategories()) == 0) {
      return FALSE;
    }

    if (count($this->getAllChildren()) == 0) {
      return FALSE;
    }

    return TRUE;
  }
9096
protected function visibilityClasses()
    {
        if (!$this->get_field('widget_header_visibility') || !is_array($this->get_field('widget_header_visibility')) || empty($this->get_field('widget_header_visibility'))) {
            return false;
        }

        $options = array(
            'xs' => 'hidden-xs',
            'sm' => 'hidden-sm',
            'md' => 'hidden-md',
            'lg' => 'hidden-lg'
        );

        $options = apply_filters('Municipio/Widget/Source/NavigationWidget/visibilityClasses', $options);

        $classes = array();

        foreach ($this->get_field('widget_header_visibility') as $device) {
            if (isset($options[$device])) {
                $classes[] = $options[$device];
            }
        }

        if (!empty($classes)) {
            $this->data['widgetWrapperClass'] = array_merge($this->data['widgetWrapperClass'], $classes);

            return true;
        }

        return false;
    }
1019055
protected function hasTablesOrViews()
    {
        $tables = $this->db->query('SHOW TABLES', DbAdapter::QUERY_MODE_EXECUTE);

        return (bool) count($tables);
    }
1343223
private function get_default_category_id() {
        global $CFG;

        if ($this->defaultcategoryid === null) {
            $category = core_course_category::get_default();
            $this->defaultcategoryid = $category->id;
        }

        return $this->defaultcategoryid;
    }