public function getDefinition()
{
+ $this->_preGetDefinition();
return $this->_attributes;
}
+ protected function _preGetDefinition()
+ {
+
+ }
+
public function init()
{
class SelectFromModel extends Model
{
protected $_adminType = 'select2_from_array';
+
protected $_columnViewNamespace = CubistBackpackServiceProvider::NAMESPACE . '::columns';
protected $_columnType = 'select_from_array';
+
protected $_databaseType = 'string';
protected $_multiple = false;
protected $_order = false;
return array_merge(parent::getDefaultAttributes(), ['order' => $this->_order]);
}
- public function _postSetAttributes()
+ protected function _preGetDefinition()
{
+ parent::_preGetDefinition();
$this->setAttribute('options', $this->_getOptions());
+ }
+ public function _postSetAttributes()
+ {
if ($this->getAttribute('allows_multiple') && $this->getAttribute('order')) {
$this->setAttribute('type', 'select_and_order');
}