public function __construct($id, $is_active, PFUser $user, array $projects) { parent::__construct($id, $is_active); $this->projects = $projects; $this->has_projects = count($projects) > 0; $this->label = $GLOBALS['Language']->getText('include_menu', 'projects'); $this->filter_project = $GLOBALS['Language']->getText('include_menu', 'filter_project'); $this->menu_projects_text = $GLOBALS['Language']->getText('include_menu', 'projects'); $this->browse_projects_text = $GLOBALS['Language']->getText('include_menu', 'browse_projects'); $this->register_new_proj = $GLOBALS['Language']->getText('include_menu', 'register_new_proj'); $this->is_trove_cat_enabled = ForgeConfig::get('sys_use_trove'); $this->is_project_registration_enabled = ForgeConfig::get('sys_use_project_registration', true); $this->display_only_trovemap = $this->is_trove_cat_enabled && !$this->is_project_registration_enabled && !$this->projects; $this->display_dropdown = !$this->display_only_trovemap && $user->isLoggedIn(); }
public function __construct($id, $is_active, $href, $label) { parent::__construct($id, $is_active); $this->href = $href; $this->label = $label; }