[ PHPXref.com ] [ Generated: Sun Jul 20 17:01:00 2008 ] [ CMS Made Simple 0.12.1 ]
[ Index ]     [ Variables ]     [ Functions ]     [ Classes ]     [ Constants ]     [ Statistics ]

title

Body

[close]

/lib/classes/ -> class.content.inc.php (summary)

This file respect the PHP Coding Standards : http://alltasks.net/code/php_coding_standard.html

File Size: 2353 lines (54 kb)
Included or required:0 times
Referenced: 1 time
Includes or requires: 0 files

Defines 3 classes

ContentBase:: (83 methods):
  ContentBase()
  SetInitialValues()
  SetProperties()
  Id()
  SetId()
  FriendlyName()
  Name()
  SetName()
  Alias()
  Type()
  SetType()
  Owner()
  SetOwner()
  Metadata()
  SetMetadata()
  TabIndex()
  SetTabIndex()
  TitleAttribute()
  SetTitleAttribute()
  AccessKey()
  SetAccessKey()
  ParentId()
  SetParentId()
  OldParentId()
  SetOldParentId()
  TemplateId()
  SetTemplateId()
  ItemOrder()
  SetItemOrder()
  OldItemOrder()
  SetOldItemOrder()
  Hierarchy()
  SetHierarchy()
  IdHierarchy()
  SetIdHierarchy()
  Active()
  SetActive()
  ShowInMenu()
  SetShowInMenu()
  DefaultContent()
  SetDefaultContent()
  Cachable()
  SetCachable()
  Markup()
  SetMarkup()
  LastModifiedBy()
  SetLastModifiedBy()
  SetAlias()
  MenuText()
  SetMenuText()
  ChildCount()
  Properties()
  HasProperty()
  GetPropertyValue()
  SetPropertyValue()
  WantsChildren()
  GetAdditionalContentBlocks()
  HasUsableLink()
  ReadyForEdit()
  DoReadyForEdit()
  LoadFromId()
  LoadFromData()
  Load()
  Save()
  Update()
  Insert()
  ValidateData()
  Delete()
  FillParams()
  GetURL()
  Show()
  ContentPreRender()
  GetTabDefinitions()
  TabNames()
  EditAsArray()
  Edit()
  AdvancedEdit()
  Help()
  HasChildren()
  GetAdditionalEditors()
  SetAdditionalEditors()
  ShowAdditionalEditors()
  IsDefaultPossible()

ContentProperties:: (9 methods):
  ContentProperties()
  SetInitialValues()
  HasProperty()
  Add()
  GetValue()
  SetValue()
  Load()
  Save()
  Delete()

ContentManager:: (14 methods):
  LoadMultipleFromId()
  LoadMultipleFromAlias()
  DisplayContent()
  IsCached()
  SetHierarchyPosition()
  SetAllHierarchyPositions()
  SetDefaultContent()
  CreateHierarchyDropdown()
  GetDefaultPageID()
  GetPageIDFromAlias()
  GetPageAliasFromID()
  CheckAliasError()
  CreateFriendlyHierarchyPosition()
  CreateUnfriendlyHierarchyPosition()


Class: ContentBase  - X-Ref

Generic content class.

As for some treatment we don't need the extra properties of the content
we load them only when required. However, each function which makes use
of extra properties should first test if the properties object exist.

ContentBase()   X-Ref
Generic constructor. Runs the SetInitialValues fuction.


SetInitialValues()   X-Ref
Sets object to some sane initial values


SetProperties()   X-Ref
Subclasses should override this to set their property types using a lot
of mProperties.Add statements


Id()   X-Ref
Returns the ID


SetId($id)   X-Ref
No description

FriendlyName()   X-Ref
Returns a friendly name for this content type


Name()   X-Ref
Returns the Name


SetName($name)   X-Ref
No description

Alias()   X-Ref
Returns the Alias


Type()   X-Ref
Returns the Type


SetType($type)   X-Ref
No description

Owner()   X-Ref
Returns the Owner


SetOwner($owner)   X-Ref
No description

Metadata()   X-Ref
Returns the Metadata


SetMetadata($metadata)   X-Ref
No description

TabIndex()   X-Ref
No description

SetTabIndex($tabindex)   X-Ref
No description

TitleAttribute()   X-Ref
No description

SetTitleAttribute($titleattribute)   X-Ref
No description

AccessKey()   X-Ref
No description

SetAccessKey($accesskey)   X-Ref
No description

ParentId()   X-Ref
Returns the ParentId


SetParentId($parentid)   X-Ref
No description

OldParentId()   X-Ref
No description

SetOldParentId($parentid)   X-Ref
No description

TemplateId()   X-Ref
No description

SetTemplateId($templateid)   X-Ref
No description

ItemOrder()   X-Ref
Returns the ItemOrder


SetItemOrder($itemorder)   X-Ref
No description

OldItemOrder()   X-Ref
No description

SetOldItemOrder($itemorder)   X-Ref
No description

Hierarchy()   X-Ref
Returns the Hierarchy


SetHierarchy($hierarchy)   X-Ref
No description

IdHierarchy()   X-Ref
Returns the Hierarchy


SetIdHierarchy($idhierarchy)   X-Ref
No description

Active()   X-Ref
Returns the Active state


SetActive($active)   X-Ref
No description

ShowInMenu()   X-Ref
Returns whether it should show in the menu


SetShowInMenu($showinmenu)   X-Ref
No description

DefaultContent()   X-Ref
Returns if the page is the default


SetDefaultContent($defaultcontent)   X-Ref
No description

Cachable()   X-Ref
No description

SetCachable($cachable)   X-Ref
No description

Markup()   X-Ref
No description

SetMarkup($markup)   X-Ref
No description

LastModifiedBy()   X-Ref
No description

SetLastModifiedBy($lastmodifiedby)   X-Ref
No description

SetAlias($alias)   X-Ref
No description

MenuText()   X-Ref
Returns the menu text for this content


SetMenuText($menutext)   X-Ref
No description

ChildCount()   X-Ref
Returns number of immediate child-content items of this content


Properties()   X-Ref
Returns the properties


HasProperty($name)   X-Ref
No description

GetPropertyValue($name)   X-Ref
No description

SetPropertyValue($name, $value)   X-Ref
No description

WantsChildren()   X-Ref
Function content types to use to say whether or not they should show
up in lists where parents of content are set.  This will default to true,
but should be used in cases like Separator where you don't want it to
have any children.


GetAdditionalContentBlocks()   X-Ref
No description

HasUsableLink()   X-Ref
Should this link be used in various places where a link is the only
useful output?  (Like next/previous links in cms_selflink, for example)


ReadyForEdit()   X-Ref
This is a callback function to handle any things that might need to be done before content is
edited.


DoReadyForEdit()   X-Ref
No description

LoadFromId($id, $loadProperties = false)   X-Ref
Load the content of the object from an ID

returns: bool            If it fails, the object comes back to initial values and returns FALSE
param: $id                the ID of the element
param: $loadProperties    whether to load or not the properties

LoadFromData($data, $loadProperties = false)   X-Ref
Load the content of the object from an array

There is no check on the data provided, because this is the job of
ValidateData

returns: bool            If it fails, the object comes back to initial values and returns FALSE

Load()   X-Ref
Callback function for content types to use to preload content or other things if necessary.  This
is called right after the properties are loaded.


Save()   X-Ref
Save or update the content


Update()   X-Ref
Update the content
We can notice, that only a few things are updated
We do not care about hierarchy for example. This is because hierarchy,
order or parents management is the job of the content manager.
Remember that a content is like a file, and a file don't know where it is
on the disk, it only knows its own content. It's the same here.


Insert()   X-Ref
No description

ValidateData()   X-Ref
Test if the array given contains valid data for the object
This function is used to check that no compulsory argument
has been forgotten by the user

We do not check the Id because there can be no Id (new content)
That's up to Save to check this.

returns: FALSE if data is ok, and an array of invalid parameters else

Delete()   X-Ref
Delete the content


FillParams($params)   X-Ref
Function for the subclass to parse out data for it's parameters (usually from $_POST)


GetURL($rewrite = true)   X-Ref
Function for content types to override to set their proper generated URL


Show($param = '')   X-Ref
Show the content


ContentPreRender($tpl_source)   X-Ref
allow the content module to handle custom tags. Typically used for parameters in {content} tags


GetTabDefinitions()   X-Ref
Returns a list of tab names that should be used when adding or editing this type of content


TabNames()   X-Ref
Returns the tab names used in the add and edit content page.  If it's an empty array, then
the tabs won't show at all.


EditAsArray($adding = false, $tab = 0, $showadmin = false)   X-Ref
Show the Alternate Edit interface


Edit($adding = false, $tab = 0, $showadmin = false)   X-Ref
Show the Edit interface


AdvancedEdit($adding = false)   X-Ref
Show the Advanced Edit interface


Help()   X-Ref
Show Help


HasChildren()   X-Ref
Does this have children?


GetAdditionalEditors()   X-Ref
No description

SetAdditionalEditors($editorarray)   X-Ref
No description

ShowAdditionalEditors()   X-Ref
No description

IsDefaultPossible()   X-Ref
No description

Class: ContentProperties  - X-Ref

Class to represent content properties.  These are pretty much
separate beings that get used by a content object instance.

ContentProperties()   X-Ref
Generic constructor. Runs the SetInitialValues fuction.


SetInitialValues()   X-Ref
Sets object to some sane initial values


HasProperty($name)   X-Ref
No description

Add($type, $name, $defaultvalue='')   X-Ref
No description

GetValue($name)   X-Ref
No description

SetValue($name, $value)   X-Ref
No description

Load($content_id)   X-Ref
No description

Save($content_id)   X-Ref
No description

Delete($content_id)   X-Ref
No description

Class: ContentManager  - X-Ref

Class for static methods related to content

LoadMultipleFromId($ids, $loadProperties = false)   X-Ref
No description

LoadMultipleFromAlias($ids, $loadProperties = false)   X-Ref
Load the content of the object from a list of aliases
Private method.

returns: array of content objects (empty if not found)
param: $ids    array of element ids
param: $alis                the alias of the element
param: $loadProperties    whether to load or not the properties

DisplayContent($content)   X-Ref
Display content


IsCached($id)   X-Ref
Determine if content should be loaded from cache


SetHierarchyPosition($contentid)   X-Ref
No description

SetAllHierarchyPositions()   X-Ref
Updates the hierarchy position of all items


SetDefaultContent($id)   X-Ref
No description

CreateHierarchyDropdown($current = '', $parent = '', $name = 'parent_id')   X-Ref
No description

GetDefaultPageID()   X-Ref
No description

GetPageIDFromAlias( $alias )   X-Ref
No description

GetPageAliasFromID( $id )   X-Ref
No description

CheckAliasError($alias, $content_id = -1)   X-Ref
No description

CreateFriendlyHierarchyPosition($position)   X-Ref
No description

CreateUnfriendlyHierarchyPosition($position)   X-Ref
No description



[ Powered by PHPXref - Served by Debian GNU/Linux ]