public function getMenuItems()
 {
     $items = array();
     if (RightsUtil::doesUserHaveAllowByRightName('WorkflowsModule', WorkflowsModule::getCreateRight(), Yii::app()->user->userModel)) {
         $items[] = array('label' => Zurmo::t('WorkflowsModule', 'Create Workflow'), 'url' => Yii::app()->createUrl('workflows/default/create'));
         return $items;
     }
     return null;
 }
 public function render()
 {
     $items = array();
     if (RightsUtil::doesUserHaveAllowByRightName('WorkflowsModule', WorkflowsModule::getCreateRight(), Yii::app()->user->userModel)) {
         $items[] = array('label' => Zurmo::t('WorkflowsModule', 'Create Workflow'), 'url' => Yii::app()->createUrl('workflows/default/create'));
     }
     if (RightsUtil::doesUserHaveAllowByRightName('EmailTemplatesModule', EmailTemplatesModule::getCreateRight(), Yii::app()->user->userModel)) {
         $items[] = array('label' => Zurmo::t('EmailTemplatesModule', 'Create Template'), 'url' => Yii::app()->createUrl('emailTemplates/default/create', array('type' => EmailTemplate::TYPE_WORKFLOW)));
     }
     if (!empty($items)) {
         $menuItems = array('label' => $this->getLabel(), 'url' => null, 'items' => $items);
         $cClipWidget = new CClipWidget();
         $cClipWidget->beginClip("ActionMenu");
         $cClipWidget->widget('application.core.widgets.MbMenu', array('htmlOptions' => array('id' => 'MashableInboxCreateDropdown'), 'items' => array($menuItems)));
         $cClipWidget->endClip();
         return $cClipWidget->getController()->clips['ActionMenu'];
     }
     return null;
 }