Ejemplo n.º 1
0
 public function __construct()
 {
     $validator = new \Extasy\Validators\IsModelClassNameValidator($_REQUEST['type']);
     if (!$validator->isValid()) {
         throw new InvalidArgumentException('Not a valid model ');
     }
     $modelName = $_REQUEST['type'];
     $aType = call_user_func([$modelName, 'getFieldsInfo']);
     $aBegin = array('К списку "' . (!empty($aType['title']) ? $aType['title'] : '') . '" ' => 'list.php?type=' . $modelName, 'Сортировка' => '#');
     $this->typeName = $modelName;
     $this->back = 'list.php?type=' . $modelName;
     parent::__construct($aBegin, 'Сортировка');
 }
Ejemplo n.º 2
0
 public function __construct()
 {
     $type = $_REQUEST['type'];
     $validator = new \Extasy\Validators\IsModelClassNameValidator($type);
     if (!$validator->isValid()) {
         throw new \ForbiddenException('Not an valid model');
     }
     $title = call_user_func(array($type, 'getLabel'), Model::labelName);
     $title = sprintf('Назад "%s" ', $title);
     $aBegin = array($title => 'list.php?type=' . $type, self::title => '#');
     $this->typeName = $type;
     $this->back = 'list.php?type=' . $type;
     $this->jump_to = 'order.php?type=' . $type;
     parent::__construct($aBegin, 'Сортировка');
 }