Encore\Admin\Form\Builder::setMode PHP Метод

setMode() публичный Метод

Set the builder mode.
public setMode ( string $mode = 'create' ) : void
$mode string
Результат void
    public function setMode($mode = 'create')
    {
        $this->mode = $mode;
    }

Usage Example

Пример #1
0
 /**
  * @param $id
  * @return $this
  */
 public function view($id)
 {
     $this->builder->setMode(Builder::MODE_VIEW);
     $this->builder->setResourceId($id);
     $this->setFieldValue($id);
     return $this;
 }