Пример #1
0
 /**
  *
  */
 function __construct()
 {
     parent::__construct('control-column', '');
     $admin = Admin::instance();
     $this->router = $admin->router;
     $this->formBuilder = $admin->formBuilder;
 }
Пример #2
0
 /**
  * @param string $name
  * @param string $label
  */
 function __construct($name, $label = null)
 {
     $this->hidden = true;
     $this->router = Admin::instance()->router;
     parent::__construct($name, $label);
     $this->model($this->modelItem->getModelClass());
     $this->value('id');
 }
Пример #3
0
 /**
  *
  */
 function __construct($name, $label = null)
 {
     parent::__construct($name, $label);
     $this->sortable = false;
     $admin = Admin::instance();
     $this->router = $admin->router;
     $this->formBuilder = $admin->formBuilder;
 }
Пример #4
0
 /**
  * @param $instance
  * @param int $totalCount
  * @return string
  */
 public function render($instance, $totalCount)
 {
     $date = $this->valueFromInstance($instance, $this->name);
     $formattedDate = '';
     if (!is_null($date)) {
         $formattedDate = DateFormatter::format($date, $this->formatDate, $this->formatTime, $this->customFormat);
     }
     return parent::render($instance, $totalCount, $formattedDate);
 }
Пример #5
0
 /**
  * Initialize column
  */
 public function initialize()
 {
     parent::initialize();
     AssetManager::addScript('admin::default/js/bootbox.js');
     AssetManager::addScript('admin::default/js/columns/control.js');
 }
 public function render($instance, $totalCount)
 {
     $content = $instance->{$this->name} ? 'Active' : 'Inactive';
     return parent::render($instance, $totalCount, $content);
 }
Пример #7
0
 /**
  * Initialize column
  */
 public function initialize()
 {
     parent::initialize();
     AssetManager::addScript('admin::default/scripts/columns/checkbox.js');
 }
Пример #8
0
 public function render($instance, $totalCount)
 {
     $content = $instance->{$this->name} ? 'High' : 'Low';
     return parent::render($instance, $totalCount, $content);
 }
Пример #9
0
 /**
  * @param $instance
  * @param int $totalCount
  * @return string
  */
 public function render($instance, $totalCount)
 {
     return parent::render($instance, $totalCount, $this->getCellContent($instance));
 }
Пример #10
0
 /**
  * @param $name
  */
 function __construct($name)
 {
     parent::__construct();
     $this->name($name);
 }
Пример #11
0
 public function render($instance, $totalCount)
 {
     $val = $instance->category->name;
     return parent::render($instance, $totalCount, $val);
 }
Пример #12
0
 /**
  * @param string $name
  * @param string $label
  */
 function __construct($name, $label = null)
 {
     $this->hidden = true;
     parent::__construct($name, $label);
 }