-
Notifications
You must be signed in to change notification settings - Fork 2
Category Attributes
Code Slicer edited this page May 18, 2023
·
8 revisions
Allows managing the eav attributes related to categories. Import it as follows:
private Migration\Facade\CategoryAttribute $categoryAttribute;
public function __construct(
Migration\Context $context,
Migration\Facade\CategoryAttribute $categoryAttribute
) {
parent::__construct($context);
$this->categoryAttribute = $categoryAttribute;
}
💡 Tip: all eav attribute capabilities are available for this entity:
https://github.com/discorgento/module-migrations/wiki/Eav-Attributes
Mass update given categories. Notice that this updates given entity attribute values, not the attribute itself as in previous examples. Eg.:
$categoryIds = [4, 5];
$this->categoryAttribute->massUpdate($categoryIds, [
'description' => 'Clothes',
]);
We want YOU for our community 🫵