PHP Class Gc\Document\Model

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

Protected Properties

Property Type Description
$name string Table name

Public Methods

Method Description
canBeCached ( boolean $canBeCached = null ) : boolean Define if document can be cached
delete ( ) : boolean Delete document
fromArray ( array $array ) : Model Initialize document from array
fromId ( integer $documentId ) : Model Initiliaze document from id
fromUrlKey ( string $urlKey, mixed $parentId = false ) : Model Initiliaze from url and parent
getAvailableChildren ( ) : false Retrieve children with his status is enable
getChildren ( ) : array (non-PHPdoc)
getDocumentType ( ) : Model Get Document type
getEditUrl ( ) : mixed (non-PHPdoc)
getIcon ( ) : mixed (non-PHPdoc)
getId ( ) : integer (non-PHPdoc)
getIterableId ( ) : string (non-PHPdoc)
getLayout ( ) : Model get View Model
getName ( ) : string (non-PHPdoc)
getParent ( ) : Model (non-PHPdoc)
getProperty ( string $propertyName ) : false Get property
getUrl ( boolean $forceCanonical = false ) : string Get document url
getView ( ) : Model get View Model
init ( integer $documentId = null ) : void Initiliaze document
isPublished ( ) : boolean Test if status is equal to self::STATUS_ENABLE
save ( ) : integer Save Model
showInNav ( boolean $isShow = null ) : boolean Define if document is show in navigation

Method Details

canBeCached() public method

Define if document can be cached
public canBeCached ( boolean $canBeCached = null ) : boolean
$canBeCached boolean Optional
return boolean

delete() public method

Delete document
public delete ( ) : boolean
return boolean

fromArray() public static method

Initialize document from array
public static fromArray ( array $array ) : Model
$array array Data
return Model

fromId() public static method

Initiliaze document from id
public static fromId ( integer $documentId ) : Model
$documentId integer Document id
return Model

fromUrlKey() public static method

Initiliaze from url and parent
public static fromUrlKey ( string $urlKey, mixed $parentId = false ) : Model
$urlKey string Url key
$parentId mixed Parent id
return Model

getAvailableChildren() public method

Retrieve children with his status is enable
public getAvailableChildren ( ) : false
return false | PropertyModel

getChildren() public method

(non-PHPdoc)
See also: include Gc\Component\IterableInterface#getChildren()
public getChildren ( ) : array
return array

getDocumentType() public method

Get Document type
public getDocumentType ( ) : Model
return Gc\DocumentType\Model

getEditUrl() public method

(non-PHPdoc)
See also: include Gc\Component\IterableInterface#getEditUrl()
public getEditUrl ( ) : mixed
return mixed

getIcon() public method

(non-PHPdoc)
See also: include Gc\Component\IterableInterface#getIcon()
public getIcon ( ) : mixed
return mixed

getId() public method

(non-PHPdoc)
See also: include Gc\Component\IterableInterface#getId()
public getId ( ) : integer
return integer

getIterableId() public method

(non-PHPdoc)
See also: include Gc\Component\IterableInterface#getIterableId()
public getIterableId ( ) : string
return string

getLayout() public method

get View Model
public getLayout ( ) : Model
return Gc\View\Model

getName() public method

(non-PHPdoc)
See also: include Gc\Component\IterableInterface#getName()
public getName ( ) : string
return string

getParent() public method

(non-PHPdoc)
See also: include Gc\Component\IterableInterface#getParent()
public getParent ( ) : Model
return Model

getProperty() public method

Get property
public getProperty ( string $propertyName ) : false
$propertyName string Property name
return false | PropertyModel

getUrl() public method

Get document url
public getUrl ( boolean $forceCanonical = false ) : string
$forceCanonical boolean Force canonical url
return string

getView() public method

get View Model
public getView ( ) : Model
return Gc\View\Model

init() public method

Initiliaze document
public init ( integer $documentId = null ) : void
$documentId integer Document id
return void

isPublished() public method

Test if status is equal to self::STATUS_ENABLE
public isPublished ( ) : boolean
return boolean

save() public method

Save Model
public save ( ) : integer
return integer

showInNav() public method

Define if document is show in navigation
public showInNav ( boolean $isShow = null ) : boolean
$isShow boolean Optional
return boolean

Property Details

$name protected property

Table name
protected string $name
return string