コード例 #1
0
ファイル: StatusButton.php プロジェクト: mesour/datagrid
 /**
  * Create button
  *
  * @param Array $data
  * @return String
  * @throws Grid_Exception
  */
 public function create($data = NULL)
 {
     if (empty($data) === FALSE) {
         $this->data = $data;
     }
     if (is_null($this->presenter)) {
         throw new Grid_Exception('Presenter is not set for ' . __CLASS__ . '.');
     }
     if (!isset($this->option[self::STATUS]) && !isset($this->option[self::CALLBACK])) {
         throw new Grid_Exception('Option ' . __CLASS__ . '::STATUS is required.');
     }
     return parent::create($data);
 }