Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Data Fields
Entity Class Reference
Inheritance diagram for Entity:
AbstractEntity AbstractResource EntityInterface ProviderInterface

Public Member Functions

 __construct (\Magento\Eav\Model\Entity\Context $context, $data=[])
 
- Public Member Functions inherited from AbstractEntity
 __construct (Context $context, $data=[])
 
 setConnection ($connection)
 
 getConnection ()
 
 getIdFieldName ()
 
 getTable ($alias)
 
 setType ($type)
 
 getEntityType ()
 
 getType ()
 
 getTypeId ()
 
 unsetAttributes ($attributes=null)
 
 addAttribute (AbstractAttribute $attribute, $object=null)
 
 isPartialLoad ($flag=null)
 
 isPartialSave ($flag=null)
 
 loadAllAttributes ($object=null)
 
 getSortedAttributes ($setId=null)
 
 attributesCompare ($firstAttribute, $secondAttribute)
 
 getAttributesByCode ()
 
 getAttributesByTable ()
 
 getEntityTable ()
 
 getLinkField ()
 
 getEntityIdField ()
 
 getValueEntityIdField ()
 
 getValueTablePrefix ()
 
 getEntityTablePrefix ()
 
 isAttributeStatic ($attribute)
 
 validate ($object)
 
 setNewIncrementId (DataObject $object)
 
 checkAttributeUniqueValue (AbstractAttribute $attribute, $object)
 
 getDefaultAttributeSourceModel ()
 
 load ($object, $entityId, $attributes=[])
 
 save (\Magento\Framework\Model\AbstractModel $object)
 
 saveAttribute (DataObject $object, $attributeCode)
 
 delete ($object)
 
 getDefaultAttributes ()
 
 afterLoad (DataObject $object)
 
 beforeSave (DataObject $object)
 
 afterSave (DataObject $object)
 
 beforeDelete (DataObject $object)
 
 afterDelete (DataObject $object)
 
- Public Member Functions inherited from AbstractResource
 __construct ()
 
 getConnection ()
 
 beginTransaction ()
 
 addCommitCallback ($callback)
 
 commit ()
 
 rollBack ()
 
 getValidationRulesBeforeSave ()
 

Data Fields

const DEFAULT_ENTITY_MODEL = \Magento\Eav\Model\Entity::class
 
const DEFAULT_ATTRIBUTE_MODEL = \Magento\Eav\Model\Entity\Attribute::class
 
const DEFAULT_BACKEND_MODEL = \Magento\Eav\Model\Entity\Attribute\Backend\DefaultBackend::class
 
const DEFAULT_FRONTEND_MODEL = \Magento\Eav\Model\Entity\Attribute\Frontend\DefaultFrontend::class
 
const DEFAULT_SOURCE_MODEL = \Magento\Eav\Model\Entity\Attribute\Source\Config::class
 
const DEFAULT_ENTITY_TABLE = 'eav_entity'
 
const DEFAULT_ENTITY_ID_FIELD = 'entity_id'
 

Additional Inherited Members

- Protected Member Functions inherited from AbstractEntity
 _construct ()
 
 _getConfig ()
 
 _isApplicableAttribute ($object, $attribute)
 
 _isCallableAttributeInstance ($instance, $method, $args)
 
 loadAttributesMetadata ($attributes)
 
 _loadModelAttributes ($object)
 
 _prepareLoadSelect (array $selects)
 
 _getLoadRowSelect ($object, $rowId)
 
 _getLoadAttributesSelect ($object, $table)
 
 _setAttributeValue ($object, $valueRow)
 
 processSave ($object)
 
 _getOrigObject ($object)
 
 _collectSaveData ($newObject)
 
 _canUpdateAttribute (AbstractAttribute $attribute, $v, array &$origData)
 
 _getStaticFieldProperties ($field)
 
 _prepareStaticValue ($key, $value)
 
 _insertAttribute ($object, $attribute, $value)
 
 _updateAttribute ($object, $attribute, $valueId, $value)
 
 _saveAttribute ($object, $attribute, $value)
 
 _processAttributeValues ()
 
 _prepareValueForSave ($value, AbstractAttribute $attribute)
 
 _deleteAttributes ($object, $table, $info)
 
 getAttributeRow ($entity, $object, $attribute)
 
 evaluateDelete ($object, $id, $connection)
 
 _afterLoad (DataObject $object)
 
 _beforeSave (DataObject $object)
 
 _afterSave (DataObject $object)
 
 _beforeDelete (DataObject $object)
 
 _afterDelete (DataObject $object)
 
 _getDefaultAttributeModel ()
 
 _getDefaultAttributes ()
 
 _isAttributeValueEmpty (AbstractAttribute $attribute, $value)
 
 getAttributeLoader ()
 
 loadAttributesForObject ($attributes, $object=null)
 
- Protected Member Functions inherited from AbstractResource
 _construct ()
 
 _serializeField (DataObject $object, $field, $defaultValue=null, $unsetEmpty=false)
 
 _unserializeField (DataObject $object, $field, $defaultValue=null)
 
 _prepareDataForTable (DataObject $object, $table)
 
 _prepareTableValueForSave ($value, $type)
 
 _getColumnsForEntityLoad (\Magento\Framework\Model\AbstractModel $object, $tableName)
 
 getSerializer ()
 
- Protected Attributes inherited from AbstractEntity
 $attributeLoader
 
 $connectionName
 
 $_type
 
 $_attributesByCode = []
 
 $_attributesByTable = []
 
 $_staticAttributes = []
 
 $_entityTable
 
 $_describeTable = []
 
 $_entityIdField
 
 $linkIdField
 
 $_valueEntityIdField
 
 $_valueTablePrefix
 
 $_entityTablePrefix
 
 $_isPartialLoad = false
 
 $_isPartialSave = false
 
 $_sortingSetId = null
 
 $_attributeValuesToDelete = []
 
 $_attributeValuesToSave = []
 
 $_resource
 
 $_eavConfig
 
 $_attrSetEntity
 
 $_localeFormat
 
 $_resourceHelper
 
 $_universalFactory
 
 $transactionManager
 
 $objectRelationProcessor
 
- Protected Attributes inherited from AbstractResource
 $serializer
 
 $_logger
 
- Static Protected Attributes inherited from AbstractEntity
static $_attributeBackendTables = []
 

Detailed Description

EAV entity model

Definition at line 12 of file Entity.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( \Magento\Eav\Model\Entity\Context  $context,
  $data = [] 
)
Parameters
Entity\Context$context
array$data@codeCoverageIgnore

Definition at line 33 of file Entity.php.

34  {
35  parent::__construct($context, $data);
36  $this->setConnection($this->_resource->getConnection('eav'));
37  }

Field Documentation

◆ DEFAULT_ATTRIBUTE_MODEL

const DEFAULT_ATTRIBUTE_MODEL = \Magento\Eav\Model\Entity\Attribute::class

Definition at line 16 of file Entity.php.

◆ DEFAULT_BACKEND_MODEL

const DEFAULT_BACKEND_MODEL = \Magento\Eav\Model\Entity\Attribute\Backend\DefaultBackend::class

Definition at line 18 of file Entity.php.

◆ DEFAULT_ENTITY_ID_FIELD

const DEFAULT_ENTITY_ID_FIELD = 'entity_id'

Definition at line 26 of file Entity.php.

◆ DEFAULT_ENTITY_MODEL

const DEFAULT_ENTITY_MODEL = \Magento\Eav\Model\Entity::class

Definition at line 14 of file Entity.php.

◆ DEFAULT_ENTITY_TABLE

const DEFAULT_ENTITY_TABLE = 'eav_entity'

Definition at line 24 of file Entity.php.

◆ DEFAULT_FRONTEND_MODEL

const DEFAULT_FRONTEND_MODEL = \Magento\Eav\Model\Entity\Attribute\Frontend\DefaultFrontend::class

Definition at line 20 of file Entity.php.

◆ DEFAULT_SOURCE_MODEL

const DEFAULT_SOURCE_MODEL = \Magento\Eav\Model\Entity\Attribute\Source\Config::class

Definition at line 22 of file Entity.php.


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