/** * Get attribute alias as "entity_type/attribute_code" * * @param \Magento\Eav\Model\Entity\AbstractEntity $entity exclude this entity * @return string */ public function getAlias($entity = null) { $alias = ''; if ($entity === null || $entity->getType() !== $this->getEntity()->getType()) { $alias .= $this->getEntity()->getType() . '/'; } $alias .= $this->getAttributeCode(); return $alias; }