Constructor.
initializes object if the id is given.
void
CMS_superResource
([integer $id = 0], [boolean $public = false])
-
integer
$id: DB id
-
boolean
$public: wich type of data (default=false : edited)
Destroy the object
boolean
destroy
([CMS_user $cms_user = false])
-
CMS_user
$cms_user: needed if object have a resource : the user who make the action
Redefinition of:
- CMS_resource::destroy()
- Totally destroys the resource from persistence. Also destroys the status.
Gets a boolean value of the object
boolean
getBoolean
( $boolean, string $string)
-
string
$string: The boolean to return
-
$boolean
Gets the default value of a data.
string
getDefaultValue
( $name)
Gets the URL of the external link
string
getExternalLink
()
Gets a file.
Can return relative to web root of filesystem root, and with or without path.
string
getFilePath
(string $name, [boolean $withPath = false], [string $dataLocation = RESOURCE_DATA_LOCATION_EDITED], [integer $relativeTo = PATH_RELATIVETO_WEBROOT], [boolean $withFilename = true])
-
string
$name: The file wanted
-
boolean
$withPath: If false, only returns the filename
-
string
$dataLocation: Where does the data lies ? See CMS_resource constants
-
integer
$relativeTo: Can be web root or filesystem relative, see base constants
-
boolean
$withFilename: Should the function return the filename too or only the path ?
Gets the DB ID of the instance.
integer
getID
()
Redefinition of:
- CMS_resource::getID()
- Gets the DB ID of the instance.
Gets an image of the object.
Can return relative to web root of filesystem root, and with or without path.
string
getImagePath
(string $imageName, [boolean $withPath = false], [string $dataLocation = RESOURCE_DATA_LOCATION_EDITED], [integer $relativeTo = PATH_RELATIVETO_WEBROOT], [boolean $withFilename = true])
-
string
$imageName: The name of the image wanted
-
boolean
$withPath: If false, only returns the filename
-
string
$dataLocation: Where does the data lies ? See CMS_resource constants
-
integer
$relativeTo: Can be web root or filesystem relative, see base constants
-
boolean
$withFilename: Should the function return the filename too or only the path ?
Gets a integer value of the object
integer
getInteger
(string $integer)
-
string
$integer: The integer to return
Gets the internal link (a page or false if no link)
Gets the link
array(linkType,linkValue)
getLink
( $linkName)
Gets the type of the link
string
getLinkType
( $linkName)
Gets an list of distinct string values.
Can return distinct string values of the database with where clauses and ordered by clause
array()
getList
(string $stringName, [array() $whereConditions = array()], [array() $orderConditions = array()], [boolean $public = false], [ $withIndex = false])
-
string
$stringName: The data name of the list wanted OR array of data names to get
-
array()
$whereConditions: to construct the where clause (default none) format array("database column name" => "database value", ... => ..., ...)
-
array()
$orderConditions: to construct the order by clause (default none) format array("database column name" => "order type : asc or desc", ... => ..., ...)
-
boolean
$public: the data location wich needed (defaul false : edited)
-
$withIndex
Gets an object of the object
CMS_object
getObject
(string $object)
-
string
$object: The object name to return
Get the object Order (search order field then return value)
integer
getOrder
()
Get the current max objects Order (search order field then return value)
integer
getOrderMax
([ $whereConditions = array()], [boolean $public = false], array() $searchConditions)
-
array()
$searchConditions: to construct the where clause (default none) format array("database column name" => "database value", ... => ..., ...)
-
boolean
$public: the data location wich needed (defaul false : edited)
-
$whereConditions
Gets a string of the object
string
getString
(string $string)
-
string
$string: The string to return
Gets the DB type of data.
array()
getTableData
()
Get a date object
-
string
$date: The date name to return
* Short hand to get value by property name
mixed
getValue
(string $name)
-
string
$name: The name of the attribute to get
Move the current object Order to the bottom (order+1) (search order field then change it)
boolean
moveDown
([ $whereConditions = array()], [boolean $public = false], array() $searchConditions)
-
array()
$searchConditions: to construct the where clause (default none) format array("database column name" => "database value", ... => ..., ...)
-
boolean
$public: the data location wich needed (defaul false : edited)
-
$whereConditions
Move the current object Order to a given position, the other object move to the current object position (search order field then change it)
boolean
moveTo
(integer $moveTo, [ $whereConditions = array()], [boolean $public = false], array() $searchConditions)
-
integer
$moveTo: the order to move to
-
array()
$searchConditions: to construct the where clause (default none) format array("database column name" => "database value", ... => ..., ...)
-
boolean
$public: the data location wich needed (defaul false : edited)
-
$whereConditions
Move the current object Order to the top (order-1) (search order field then change it)
boolean
moveUp
([ $whereConditions = array()], [boolean $public = false], array() $searchConditions)
-
array()
$searchConditions: to construct the where clause (default none) format array("database column name" => "database value", ... => ..., ...)
-
boolean
$public: the data location wich needed (defaul false : edited)
-
$whereConditions
make a search of objects in database Can return object or object ID values of the database with where clauses and ordered by clause
array()
search
([array() $searchConditions = array()], [array() $orderConditions = array()], [boolean $outputObjects = false], [boolean $public = false], [ $operator = "="])
-
array()
$searchConditions: to construct the where clause (default none) format array("database column name" => "database value", ... => ..., ...)
-
array()
$orderConditions: to construct the order by clause (default none) format array("database column name" => "order type : asc or desc", ... => ..., ...)
-
boolean
$outputObjects: the data to return (array of objects or array of object IDs) default is false (array of object IDs)
-
boolean
$public: the data location wich needed (defaul false : edited)
-
$operator
Set a boolean of the object
boolean
setBoolean
(string $booleanName, boolean $booleanValue)
-
string
$booleanName: The boolean name to set
-
boolean
$booleanValue: The boolean value to set (0/1/true/false only)
Set a date object
boolean
setDate
(string $dateName, dateValue $dateValue)
-
string
$dateName: The date name to set
-
dateValue
$dateValue: the object date
Sets the external link
boolean
setExternalLink
(string $url)
-
string
$url: The url to set
Set a file
boolean
setFile
(string $name, string $filename)
-
string
$name: The file to set
-
string
$filename: The filename value to set
Set an image filename
boolean
setImage
(string $imageName, string $filename)
-
string
$imageName: The image name to set
-
string
$filename: The filename value to set
Set an integer of the object
boolean
setInteger
(string $integerName, boolean $integerValue)
-
string
$integerName: The integer name to set
-
boolean
$integerValue: The integer or positiveInteger value to set
Sets the internal link
boolean
setInternalLink
(integer $pageID)
-
integer
$pageID: The DB ID of the page linked
Sets the type of link
boolean
setLink
( $linkName, $linkType, $linkValue, integer $type)
-
integer
$type: The type to set
-
$linkName
-
$linkType
-
$linkValue
Set an object
boolean
setObject
(string $objectName, integer $objectValue, [boolean $valueIsObject = false])
-
string
$objectName: The string name to set
-
boolean
$valueIsObject: the type of $objectValue (ID or object) default is false (ID)
-
integer
$objectValue: or object $objectValue the object ID or the object itself
Get the object Order (search order field then return value)
integer
setOrder
( $order)
Set a string of the object
boolean
setString
(string $stringName, string $stringValue)
-
string
$stringName: The string name to set
-
string
$stringValue: The string value to set
Short hand to set value by property name
mixed
setValue
(string $name, [mixed $value = null])
-
string
$name: The name of the attribute to get
-
mixed
$value: The value to set for the attribute
Writes the object data into persistence (MySQL for now), along with base data.
boolean
writeToPersistence
()
Redefinition of:
- CMS_resource::writeToPersistence()
- Writes the resource into persistence (MySQL for now).
if this object use Automne resource ?
boolean
_hasResource
()
initialise all objects for this resource
boolean
_initObjects
()
Inherited Methods
Inherited From CMS_resource
CMS_resource::CMS_resource()
CMS_resource::addEdition()
CMS_resource::addValidationRefused()
CMS_resource::cancelAllEditions()
CMS_resource::destroy()
CMS_resource::getAllDataLocations()
CMS_resource::getAllLinkTypes()
CMS_resource::getEditors()
CMS_resource::getEditorsStack()
CMS_resource::getID()
CMS_resource::getLocation()
CMS_resource::getLock()
CMS_resource::getLockDate()
CMS_resource::getProposedLocation()
CMS_resource::getPublication()
CMS_resource::getPublicationDateEnd()
CMS_resource::getPublicationDateStart()
CMS_resource::getStatus()
CMS_resource::isProposedForOutsideUserspace()
CMS_resource::lock()
CMS_resource::removeProposedLocation()
CMS_resource::resetEditorsStack()
CMS_resource::setProposedLocation()
CMS_resource::setPublicationDates()
CMS_resource::unlock()
CMS_resource::validateEdition()
CMS_resource::validateProposedLocation()
CMS_resource::writeToPersistence()
Inherited From CMS_grandFather
CMS_grandFather::autoload()
CMS_grandFather::hasError()
CMS_grandFather::log()
CMS_grandFather::PHPErrorHandler()
CMS_grandFather::raiseError()
CMS_grandFather::setDebug()
CMS_grandFather::setLog()
CMS_grandFather::_raiseError()
CMS_grandFather::__call()