protected function getFilteredAttribute() { if (!($attributeId = $this->get('attr_id'))) { return null; } if ($attribute = $this->getMetaModel()->getAttributeById($attributeId)) { return $attribute; } return null; }