/** * Get the menu to be shown on projects * * @return ArrayList */ public function Menu() { $list = new ArrayList(); $controller = Controller::curr(); $actionType = $controller->getField('CurrentActionType'); if (DNRoot::FlagSnapshotsEnabled() && $this->isProjectReady()) { $list->push(new ArrayData(array('Link' => sprintf('naut/project/%s/snapshots', $this->Name), 'Title' => 'Snapshots', 'IsCurrent' => $this->isSection() && $controller->getAction() == 'snapshots', 'IsSection' => $this->isSection() && $actionType == DNRoot::ACTION_SNAPSHOT))); } $this->extend('updateMenu', $list); return $list; }
/** * Get the menu to be shown on projects * * @return ArrayList */ public function Menu() { $list = new ArrayList(); $list->push(new ArrayData(array('Link' => sprintf('naut/project/%s', $this->Name), 'Title' => 'Deploy', 'IsActive' => Controller::curr()->getAction() == 'project'))); if (DNRoot::FlagSnapshotsEnabled()) { $list->push(new ArrayData(array('Link' => sprintf('naut/project/%s/snapshots', $this->Name), 'Title' => 'Snapshots', 'IsActive' => Controller::curr()->getAction() == 'snapshots'))); } $this->extend('updateMenu', $list); return $list; }