PHP Class Gc\Property\Model

Inheritance: extends Gc\Db\AbstractTable
Show file Open project: gotcms/gotcms Class Usage Examples

Protected Properties

Property Type Description
$name string Table name
$value Gc\Property\Value\Model Accessor for \Gc\Property\Value\Model

Public Methods

Method Description
delete ( ) : boolean Delete property
fromArray ( array $array ) : Model Initiliaze model from array
fromId ( integer $propertyId ) : Model Initiliaze model from id
fromIdentifier ( string $identifier, integer $documentId ) : Model Initiliaze model from identifier
getValue ( ) : mixed Return property value
getValueModel ( ) : Model Return property value model
isRequired ( boolean $value = null ) : mixed Get if property is required or not
loadValue ( ) : Model Load property value
save ( ) : integer Save property
saveValue ( ) : boolean Save property value
setValue ( mixed $value ) : Model Set property value

Method Details

delete() public method

Delete property
public delete ( ) : boolean
return boolean

fromArray() public static method

Initiliaze model from array
public static fromArray ( array $array ) : Model
$array array Data
return Model

fromId() public static method

Initiliaze model from id
public static fromId ( integer $propertyId ) : Model
$propertyId integer Property id
return Model

fromIdentifier() public static method

Initiliaze model from identifier
public static fromIdentifier ( string $identifier, integer $documentId ) : Model
$identifier string Identifier
$documentId integer Document id
return Model

getValue() public method

Return property value
public getValue ( ) : mixed
return mixed

getValueModel() public method

Return property value model
public getValueModel ( ) : Model
return Gc\Property\Value\Model

isRequired() public method

Get if property is required or not
public isRequired ( boolean $value = null ) : mixed
$value boolean Value
return mixed

loadValue() public method

Load property value
public loadValue ( ) : Model
return Model

save() public method

Save property
public save ( ) : integer
return integer

saveValue() public method

Save property value
public saveValue ( ) : boolean
return boolean

setValue() public method

Set property value
public setValue ( mixed $value ) : Model
$value mixed Value
return Model

Property Details

$name protected property

Table name
protected string $name
return string

$value protected property

Accessor for \Gc\Property\Value\Model
protected Model,Gc\Property\Value $value
return Gc\Property\Value\Model