{
protected static $_options = [];
- public function getColumnData()
- {
- $res = parent::getColumnData();
- $res['model'] = $this->getAttribute('optionsmodel');
- $res['attribute'] = $this->getAttribute('attribute');
- return $res;
- }
-
public function getDefaultAttributes()
{
return array_merge(parent::getDefaultAttributes(), ['attribute' => 'name', 'allows_null' => false, 'allows_multiple' => $this->_multiple]);
protected function _getOptions()
{
- $cacheKey = $this->getAttribute('name') . '-' . $this->getAttribute('optionsmodel');
+ $cacheKey = $this->getAttribute('optionsmodel');
if (!isset(static::$_options[$cacheKey])) {
static::$_options[$cacheKey] = $this->__getOptions();
public function getColumnData()
{
$res = parent::getColumnData();
- $res['options'] = $this->getAttribute('options');
+ $res['options'] = $this->_getOptions();
return $res;
}
}