public function __construct($controller, $alias) { $this->alias = $alias; $this->theme = Theme::getEditTheme(); parent::__construct($controller, []); $this->bindToController(); $this->checkUploadPostback(); }
/** * Constructor. */ public function __construct($controller, $configuration = []) { parent::__construct($controller, $configuration); /* * Process configuration */ if (isset($this->config->prompt)) { $this->placeholder = trans($this->config->prompt); } if (isset($this->config->partial)) { $this->customPartial = $this->config->partial; } }
public function __construct($controller) { parent::__construct($controller, []); $this->bindToController(); $configFile = 'config_' . snake_case($this->alias) . '.yaml'; $path = $controller->getConfigPath($configFile); if (File::isFile($path)) { $config = $this->makeConfig($configFile); foreach ($config as $field => $value) { if (property_exists($this, $field)) { $this->{$field} = $value; } } } }
/** * Constructor. */ public function __construct($controller, $configuration = []) { parent::__construct($controller, $configuration); /* * Prepare the search widget (optional) */ if (isset($this->config->search)) { if (is_string($this->config->search)) { $searchConfig = $this->makeConfig(['partial' => $this->config->search]); } else { $searchConfig = $this->makeConfig($this->config->search); } $searchConfig->alias = $this->alias . 'Search'; $this->searchWidget = $this->makeWidget('Backend\\Widgets\\Search', $searchConfig); $this->searchWidget->bindToController(); } }
public function __construct($controller, $alias, callable $dataSource) { $this->alias = $alias; $this->dataSource = $dataSource; $this->theme = Theme::getEditTheme(); parent::__construct($controller, []); if (!Request::isXmlHttpRequest()) { $this->resetSelection(); } $configFile = 'config_' . snake_case($alias) . '.yaml'; $config = $this->makeConfig($configFile); foreach ($config as $field => $value) { if (property_exists($this, $field)) { $this->{$field} = $value; } } $this->bindToController(); }
/** * Constructor. */ public function __construct($controller, $configuration = []) { parent::__construct($controller, $configuration); /* * Process configuration */ if (isset($this->config->prompt)) { $this->placeholder = trans($this->config->prompt); } if (isset($this->config->partial)) { $this->customPartial = $this->config->partial; } if (isset($this->config->growable)) { $this->growable = $this->config->growable; } /* * Add CSS class styles */ $this->cssClasses[] = 'icon search'; if ($this->growable) { $this->cssClasses[] = 'growable'; } }
public function __construct($controller, $alias) { $this->alias = $alias; parent::__construct($controller, []); $this->bindToController(); }
public function __construct($controller, $alias) { $this->alias = $alias; parent::__construct($controller, []); $this->checkUploadPostback(); }
protected function putSession($key, $value) { return parent::putSession($this->getThemeSessionKey($key), $value); }
/** * Ensure fields are defined and form widgets are registered so they can * also be bound to the controller this allows their AJAX features to * operate. * @return void */ public function bindToController() { $this->defineFormFields(); parent::bindToController(); }
/** * Returns a unique ID for this widget. Useful in creating HTML markup. */ public function getId($suffix = null) { $id = parent::getId($suffix); $id .= '-' . $this->fieldName; return Str::evalHtmlId($id); }
/** * Ensure report widgets are registered so they can also be bound to * the controller this allows their AJAX features to operate. * @return void */ public function bindToController() { $this->defineReportWidgets(); parent::bindToController(); }
/** * Returns a unique ID for this widget. Useful in creating HTML markup. */ public function getId($suffix = null) { $id = parent::getId($suffix); $id .= '-' . $this->fieldName; return HtmlHelper::nameToId($id); }