mirocow\eav\handlers\MultipleOptionsValueHandler::load PHP Method

load() public method

public load ( )
    public function load()
    {
        $EavModel = $this->attributeHandler->owner;
        /** @var ActiveRecord $valueClass */
        $valueClass = $EavModel->valueClass;
        $models = $valueClass::findAll(['entityId' => $EavModel->entityModel->getPrimaryKey(), 'attributeId' => $this->attributeHandler->attributeModel->getPrimaryKey()]);
        $values = [];
        foreach ($models as $model) {
            $values[] = $model->optionId;
        }
        return $values;
    }