Toggle navigation
Hot Examples
EN
EN
RU
DE
FR
ES
PT
IT
JP
ZH
KO
PHP
PHP
C#
Java
Go
C++
Python
JS
TS
Search
Home
Webiny
Component
Entity
Attribute
AbstractAttribute
setOnce
Webiny\Component\Entity\Attribute\AbstractAttribute::setOnce PHP Method
AbstractAttribute Class Documentation
Show file
Open project: Webiny/Framework
setOnce()
public
method
Set 'once' flag
If true, it tells AbstractEntity to only populate this attribute if it's a new entity
This is useful when you want to protect values from being populate on later updates.
public
setOnce
(
boolean
$flag
= true )
$flag
boolean
public function setOnce($flag = true) { $this->once = $flag; return $this; }
AbstractAttribute
__construct
__toString
applyValidator
attr
canAssign
expected
getAfterPopulate
getDbValue
getDefaultValue
getName
getOnce
getParent
getSkipOnPopulate
getStoreToDb
getToArrayDefault
getValidationMessages
getValidators
getValue
hasToArrayCallback
hasValue
isRequired
jsonSerialize
onFromDb
onGet
onSet
onToArray
onToDb
processCallback
processFromDbValue
processGetValue
processSetValue
processToArrayValue
processToDbValue
setAfterPopulate
setDefaultValue
setName
setOnce
setParent
setRequired
setSkipOnPopulate
setToArrayDefault
setValidationMessages
setValidators
setValue
toArray
validate