{"action":"created","issue":{"url":"https://api.github.com/repos/webadmin87/rzwebsys7/issues/48","labels_url":"https://api.github.com/repos/webadmin87/rzwebsys7/issues/48/labels{/name}","comments_url":"https://api.github.com/repos/webadmin87/rzwebsys7/issues/48/comments","events_url":"https://api.github.com/repos/webadmin87/rzwebsys7/issues/48/events","html_url":"https://github.com/webadmin87/rzwebsys7/issues/48","id":117981809,"number":48,"title":"Eav модуль для магазина.","user":{"login":"loveorigami","id":98164,"avatar_url":"https://avatars.githubusercontent.com/u/98164?v=3","gravatar_id":"","url":"https://api.github.com/users/loveorigami","html_url":"https://github.com/loveorigami","followers_url":"https://api.github.com/users/loveorigami/followers","following_url":"https://api.github.com/users/loveorigami/following{/other_user}","gists_url":"https://api.github.com/users/loveorigami/gists{/gist_id}","starred_url":"https://api.github.com/users/loveorigami/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/loveorigami/subscriptions","organizations_url":"https://api.github.com/users/loveorigami/orgs","repos_url":"https://api.github.com/users/loveorigami/repos","events_url":"https://api.github.com/users/loveorigami/events{/privacy}","received_events_url":"https://api.github.com/users/loveorigami/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-20T07:25:18Z","updated_at":"2015-11-20T12:45:44Z","closed_at":null,"body":"Разбираюсь с модулем shop.\r\nЕсть необходимость для разных категорий задать доп. аттрибуты.\r\nНапример, категория:\r\n* Телевизоры (размер экрана, матрица, частота кадра...)\r\n* Бумага (формат, плотность, цвет...)\r\n\r\nДля этих целей есть модуль https://github.com/Mirocow/yii2-eav\r\nПереписал я его с учетом ядра системы с Metа моделями...\r\n\r\nТеперь возник вопрос - как его подключить через мета-модель продуктов?\r\nhttps://github.com/webadmin87/rzwebsys7/blob/master/app/modules/catalog/models/meta/ProducerMeta.php\r\n\r\n-------\r\n\r\nЗа вывод eav - полей отвечает следующий код\r\n```php\r\nforeach($model->getEavAttributes()->all() as $attr){\r\n    echo $form->field($model, $attr->name, ['class' => '\\mirocow\\eav\\widgets\\ActiveField'])->eavInput();\r\n}        \r\n```\r\nследовательно, нужно создать input-class, типа \"class\" => \\common\\db\\fields\\EavField::className(), в нем подключить поведение...\r\n\r\nно как сгенерировать eav поля формы, не пойму.\r\nВедь для объявления в мета модели input-classa нужен аттрибут. А его на самом деле нет...\r\n\r\nИли возможен другой подход для подключения eav модуля?\r\n\r\nПрописать в модели продуктов свойств ```isEavModel=true``` ?\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/webadmin87/rzwebsys7/issues/comments/158388796","html_url":"https://github.com/webadmin87/rzwebsys7/issues/48#issuecomment-158388796","issue_url":"https://api.github.com/repos/webadmin87/rzwebsys7/issues/48","id":158388796,"user":{"login":"webadmin87","id":5570626,"avatar_url":"https://avatars.githubusercontent.com/u/5570626?v=3","gravatar_id":"","url":"https://api.github.com/users/webadmin87","html_url":"https://github.com/webadmin87","followers_url":"https://api.github.com/users/webadmin87/followers","following_url":"https://api.github.com/users/webadmin87/following{/other_user}","gists_url":"https://api.github.com/users/webadmin87/gists{/gist_id}","starred_url":"https://api.github.com/users/webadmin87/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/webadmin87/subscriptions","organizations_url":"https://api.github.com/users/webadmin87/orgs","repos_url":"https://api.github.com/users/webadmin87/repos","events_url":"https://api.github.com/users/webadmin87/events{/privacy}","received_events_url":"https://api.github.com/users/webadmin87/received_events","type":"User","site_admin":false},"created_at":"2015-11-20T12:45:44Z","updated_at":"2015-11-20T12:45:44Z","body":"Думаю да, надо создать класс EavField и для него EavInput, в котором уже и генерить eav поля.  "}}