Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions
Category Class Reference
Inheritance diagram for Category:
AbstractBackend BackendInterface

Public Member Functions

 afterLoad ($object)
 
- Public Member Functions inherited from AbstractBackend
 setAttribute ($attribute)
 
 getAttribute ()
 
 getType ()
 
 isStatic ()
 
 getTable ()
 
 getEntityIdField ()
 
 setValueId ($valueId)
 
 setEntityValueId ($entity, $valueId)
 
 getValueId ()
 
 getEntityValueId ($entity)
 
 getDefaultValue ()
 
 validate ($object)
 
 afterLoad ($object)
 
 beforeSave ($object)
 
 afterSave ($object)
 
 beforeDelete ($object)
 
 afterDelete ($object)
 
 getAffectedFields ($object)
 
 isScalar ()
 

Additional Inherited Members

- Protected Attributes inherited from AbstractBackend
 $_attribute
 
 $_valueId
 
 $_valueIds = []
 
 $_table
 
 $_entityIdField
 
 $_defaultValue = null
 

Detailed Description

Definition at line 14 of file Category.php.

Member Function Documentation

◆ afterLoad()

afterLoad (   $object)

Set category ids to product data

Parameters
\Magento\Catalog\Model\Product$object
Returns
$this

Implements BackendInterface.

Definition at line 22 of file Category.php.

23  {
24  $object->setData($this->getAttribute()->getAttributeCode(), $object->getCategoryIds());
25  return parent::afterLoad($object);
26  }

The documentation for this class was generated from the following file: