Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Protected Member Functions
SynonymGroup Class Reference
Inheritance diagram for SynonymGroup:
AbstractModel SynonymGroupInterface DataObject

Public Member Functions

 getGroupId ()
 
 setGroupId ($groupId)
 
 getWebsiteId ()
 
 setWebsiteId ($websiteId)
 
 getStoreId ()
 
 setStoreId ($storeId)
 
 getSynonymGroup ()
 
 setSynonymGroup ($synonymGroup)
 
 setScope ()
 
- Public Member Functions inherited from AbstractModel
 __construct (\Magento\Framework\Model\Context $context, \Magento\Framework\Registry $registry, \Magento\Framework\Model\ResourceModel\AbstractResource $resource=null, \Magento\Framework\Data\Collection\AbstractDb $resourceCollection=null, array $data=[])
 
 __sleep ()
 
 __wakeup ()
 
 setIdFieldName ($name)
 
 getIdFieldName ()
 
 getId ()
 
 setId ($value)
 
 isDeleted ($isDeleted=null)
 
 hasDataChanges ()
 
 setData ($key, $value=null)
 
 unsetData ($key=null)
 
 setDataChanges ($value)
 
 getOrigData ($key=null)
 
 setOrigData ($key=null, $data=null)
 
 dataHasChangedFor ($field)
 
 getResourceName ()
 
 getResourceCollection ()
 
 getCollection ()
 
 load ($modelId, $field=null)
 
 beforeLoad ($identifier, $field=null)
 
 afterLoad ()
 
 isSaveAllowed ()
 
 setHasDataChanges ($flag)
 
 save ()
 
 afterCommitCallback ()
 
 isObjectNew ($flag=null)
 
 beforeSave ()
 
 validateBeforeSave ()
 
 getCacheTags ()
 
 cleanModelCache ()
 
 afterSave ()
 
 delete ()
 
 beforeDelete ()
 
 afterDelete ()
 
 afterDeleteCommit ()
 
 getResource ()
 
 getEntityId ()
 
 setEntityId ($entityId)
 
 clearInstance ()
 
 getStoredData ()
 
 getEventPrefix ()
 
- Public Member Functions inherited from DataObject
 __construct (array $data=[])
 
 addData (array $arr)
 
 setData ($key, $value=null)
 
 unsetData ($key=null)
 
 getData ($key='', $index=null)
 
 getDataByPath ($path)
 
 getDataByKey ($key)
 
 setDataUsingMethod ($key, $args=[])
 
 getDataUsingMethod ($key, $args=null)
 
 hasData ($key='')
 
 toArray (array $keys=[])
 
 convertToArray (array $keys=[])
 
 toXml (array $keys=[], $rootName='item', $addOpenTag=false, $addCdata=true)
 
 convertToXml (array $arrAttributes=[], $rootName='item', $addOpenTag=false, $addCdata=true)
 
 toJson (array $keys=[])
 
 convertToJson (array $keys=[])
 
 toString ($format='')
 
 __call ($method, $args)
 
 isEmpty ()
 
 serialize ($keys=[], $valueSeparator='=', $fieldSeparator=' ', $quote='"')
 
 debug ($data=null, &$objects=[])
 
 offsetSet ($offset, $value)
 
 offsetExists ($offset)
 
 offsetUnset ($offset)
 
 offsetGet ($offset)
 

Protected Member Functions

 _construct ()
 
- Protected Member Functions inherited from AbstractModel
 _construct ()
 
 _init ($resourceModel)
 
 _setResourceModel ($resourceName, $collectionName=null)
 
 _getResource ()
 
 _getEventData ()
 
 _beforeLoad ($modelId, $field=null)
 
 _afterLoad ()
 
 _hasModelChanged ()
 
 _getValidatorBeforeSave ()
 
 _createValidatorBeforeSave ()
 
 _getValidationRulesBeforeSave ()
 
 _clearReferences ()
 
 _clearData ()
 
- Protected Member Functions inherited from DataObject
 _getData ($key)
 
 _underscore ($name)
 

Additional Inherited Members

- Protected Attributes inherited from AbstractModel
 $_eventPrefix = 'core_abstract'
 
 $_eventObject = 'object'
 
 $_idFieldName = 'id'
 
 $_hasDataChanges = false
 
 $_origData
 
 $_isDeleted = false
 
 $_resource
 
 $_resourceCollection
 
 $_resourceName
 
 $_collectionName
 
 $_cacheTag = false
 
 $_dataSaveAllowed = true
 
 $_isObjectNew = null
 
 $_validatorBeforeSave = null
 
 $_eventManager
 
 $_cacheManager
 
 $_registry
 
 $_logger
 
 $_appState
 
 $_actionValidator
 
 $storedData = []
 
- Protected Attributes inherited from DataObject
 $_data = []
 
- Static Protected Attributes inherited from DataObject
static $_underscoreCache = []
 

Detailed Description

Definition at line 11 of file SynonymGroup.php.

Member Function Documentation

◆ _construct()

_construct ( )
protected

Init resource model

Returns
void

Definition at line 18 of file SynonymGroup.php.

19  {
20  $this->_init(\Magento\Search\Model\ResourceModel\SynonymGroup::class);
21  }

◆ getGroupId()

getGroupId ( )

{Gets group id

Returns
int
Since
100.1.0
}

Implements SynonymGroupInterface.

Definition at line 26 of file SynonymGroup.php.

27  {
28  return $this->getData('group_id');
29  }
getData($key='', $index=null)
Definition: DataObject.php:119

◆ getStoreId()

getStoreId ( )

{Gets store id

Returns
int
Since
100.1.0
}

Implements SynonymGroupInterface.

Definition at line 60 of file SynonymGroup.php.

61  {
62  return $this->getData('store_id') === null ? 0 : $this->getData('store_id');
63  }
getData($key='', $index=null)
Definition: DataObject.php:119

◆ getSynonymGroup()

getSynonymGroup ( )

{Gets synonym group

Returns
string
Since
100.1.0
}

Implements SynonymGroupInterface.

Definition at line 77 of file SynonymGroup.php.

78  {
79  return $this->getData('synonyms');
80  }
getData($key='', $index=null)
Definition: DataObject.php:119

◆ getWebsiteId()

getWebsiteId ( )

{Gets website id

Returns
int
Since
100.1.0
}

Implements SynonymGroupInterface.

Definition at line 43 of file SynonymGroup.php.

44  {
45  return $this->getData('website_id') === null ? 0 : $this->getData('website_id');
46  }
getData($key='', $index=null)
Definition: DataObject.php:119

◆ setGroupId()

setGroupId (   $groupId)

{Sets group id

Parameters
int$groupId
Returns
$this
Since
100.1.0
}

Implements SynonymGroupInterface.

Definition at line 34 of file SynonymGroup.php.

35  {
36  $this->setData('group_id', $groupId);
37  return $this;
38  }

◆ setScope()

setScope ( )

sets the 'scope_id' to website:storeviewid

Returns
void

Definition at line 96 of file SynonymGroup.php.

97  {
98  $this->setData('scope_id', $this->getWebsiteId() . ':' . $this->getStoreId());
99  }

◆ setStoreId()

setStoreId (   $storeId)

{Sets store id

Parameters
int$id
Returns
$this
Since
100.1.0
}

Implements SynonymGroupInterface.

Definition at line 68 of file SynonymGroup.php.

69  {
70  $this->setData('store_id', $storeId);
71  return $this;
72  }

◆ setSynonymGroup()

setSynonymGroup (   $synonymGroup)

{Sets synonym group

Parameters
string$synonymGroup
Returns
$this
Since
100.1.0
}

Implements SynonymGroupInterface.

Definition at line 85 of file SynonymGroup.php.

86  {
87  $this->setData('synonyms', $synonymGroup);
88  return $this;
89  }

◆ setWebsiteId()

setWebsiteId (   $websiteId)

{Sets website id

Parameters
int$id
Returns
$this
Since
100.1.0
}

Implements SynonymGroupInterface.

Definition at line 51 of file SynonymGroup.php.

52  {
53  $this->setData('website_id', $websiteId);
54  return $this;
55  }

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