public function __construct($id, $model = null)
 {
     if ($model != null && !$model instanceof ArrayModel && gettype($model->getModelObject()) != Component::TYPE_ARRAY) {
         throw new \InvalidArgumentException('List View must have an Array Model or a model of an array');
     }
     if ($model == null) {
         parent::__construct($id);
     } else {
         parent::__construct($id, $model);
     }
 }
Exemple #2
0
 public function __construct($id, $model = null, $onSubmit = null, $onError = null)
 {
     parent::__construct($id, $model);
     if ($onError != null) {
         Args::callBack($onError, 'onError');
         $this->onError = $onError;
     }
     if ($onSubmit != null) {
         Args::callBack($onSubmit, 'onSubmit');
         $this->onSubmit = $onSubmit;
     }
 }
Exemple #3
0
 public function __construct($id, Model $model, $index)
 {
     parent::__construct($id, $model);
     $this->index = $index;
 }
 public function __construct($id, MarkupElement $markup)
 {
     parent::__construct($id);
     $this->setMarkup($markup);
     $this->setRenderBodyOnly(true);
 }
Exemple #5
0
 public function __construct()
 {
     parent::__construct(PageMap::getNextPageId());
 }