Exemplo n.º 1
0
 public function __construct($viewData, $params, $uniqueLayoutId)
 {
     assert('isset($params["controllerId"])');
     assert('isset($params["relationModuleId"])');
     assert('$params["relationModel"] instanceof RedBeanModel || $params["relationModel"] instanceof ModelForm');
     assert('isset($params["portletId"])');
     assert('isset($params["redirectUrl"])');
     $this->modelClassName = $this->getModelClassName();
     $this->viewData = $viewData;
     $this->params = $params;
     $this->uniqueLayoutId = $uniqueLayoutId;
     $this->gridIdSuffix = $uniqueLayoutId;
     $this->rowsAreSelectable = false;
     $this->gridId = 'list-view';
     $this->controllerId = $this->resolveControllerId();
     $this->moduleId = $this->resolveModuleId();
     parent::__construct('Details', $this->controllerId, $this->moduleId, $params["relationModel"]);
 }
 /**
  * @return array
  */
 public static function getDefaultMetadata()
 {
     $metadata = parent::getDefaultMetadata();
     $metadata['global']['toolbar']['elements'] = array(array('type' => 'SaveButton', 'renderType' => 'Edit'), array('type' => 'CancelLink', 'renderType' => 'Edit'));
     return $metadata;
 }