Example #1
0
 /**
  * 
  * @param string $type
  * @param Element\ButtonElement|string $button
  * @param array $params Decorator parameters
  * @throws Exception
  */
 public function addRowAction($link, $button = null, array $params = null)
 {
     if (!$button instanceof ButtonElement) {
         $title = $button;
         $button = new ButtonElement();
         $button->setTitle($title);
     }
     $button->setLink($link);
     if (is_array($params)) {
         $button->setDecoratorParams($params);
     }
     return $this->_addEvent('row', $button);
 }
Example #2
0
 /**
  * Returns a rendered button
  * @param ButtonElement $button
  * @return string
  */
 protected function _renderButton(ButtonElement $button, $alias)
 {
     $params = $button->getDecoratorParams();
     $params['size'] = 'medium';
     $params['data'] = array('member' => $this->_key, 'uuid' => $this->_uuid, 'alias' => $alias);
     $deco = View\Decorator::factory($button, $params);
     return $deco->render();
 }