protected function getMenuItems() { $deleteElement = new CampaignDeleteLinkActionElement($this->controllerId, $this->moduleId, $this->modelId); $deleteElementContent = $deleteElement->renderMenuItem(); $editElement = new EditLinkActionElement($this->controllerId, $this->moduleId, $this->modelId); $editElementContent = $editElement->renderMenuItem(); $copyElement = new CopyLinkActionElement($this->controllerId, $this->moduleId, $this->modelId); $copyElementContent = $copyElement->renderMenuItem(); // TODO: @Shoaibi/@Jason: Low: securable on these items from the outside coming in? $menuItems = array($editElementContent, $deleteElementContent, $copyElementContent); return $menuItems; }
public function render() { $deleteElement = new CampaignDeleteLinkActionElement($this->controllerId, $this->moduleId, $this->modelId); $deleteElementContent = $deleteElement->renderMenuItem(); $editElement = new EditLinkActionElement($this->controllerId, $this->moduleId, $this->modelId); $editElementContent = $editElement->renderMenuItem(); // TODO: @Shoaibi/@Jason: Low: securable on these items from the outside coming in? $menuItems = array('label' => $this->getLabel(), 'url' => null, 'items' => array($editElementContent, $deleteElementContent)); $cClipWidget = new CClipWidget(); $cClipWidget->beginClip("ActionMenu"); $cClipWidget->widget('application.core.widgets.MbMenu', array('htmlOptions' => array('id' => 'ListViewOptionsActionMenu'), 'items' => array($menuItems))); $cClipWidget->endClip(); return $cClipWidget->getController()->clips['ActionMenu']; }