src/CoreBundle/EventListener/DcGeneral/Table/DcaSettingCondition/AttributeIdListener.php
public function getAttributeOptions(GetPropertyOptionsEvent $event)
    {
        if (!$this->wantToHandle($event)) {
            return;
        }

        $result        = [];
        $metaModel     = $this->getMetaModel($event->getEnvironment());
        $conditionType = $event->getModel()->getProperty('type');
        foreach ($metaModel->getAttributes() as $attribute) {
            if (!$this->conditionFactory->supportsAttribute($conditionType, $attribute->get('type'))) {
                continue;
            }

            $typeName              = $attribute->get('type');
            $strSelectVal          = $metaModel->getTableName() .'_' . $attribute->getColName();
            $result[$strSelectVal] = $attribute->getName() . ' [' . $typeName . ']';
        }

        $event->setOptions($result);
    }
public function getAttributeOptions(GetPropertyOptionsEvent $event)
    {
        if (!$this->wantToHandle($event)) {
            return;
        }

        $result        = [];
        $metaModel     = $this->getMetaModel($event->getEnvironment());
        $conditionType = $event->getModel()->getProperty('type');
        foreach ($metaModel->getAttributes() as $attribute) {
            if (!$this->conditionFactory->supportsAttribute($conditionType, $attribute->get('type'))) {
                continue;
            }

            $typeName              = $attribute->get('type');
            $strSelectVal          = $metaModel->getTableName() .'_' . $attribute->getColName();
            $result[$strSelectVal] = $attribute->getName() . ' [' . $typeName . ']';
        }

        $event->setOptions($result);
    }
Prepares an option list with alias => name connection for all attributes.

This is used in the attr_id select box.

@param GetPropertyOptionsEvent $event The event.

@return void