CaMykS  1.0-20231201
Public Member Functions | Public Attributes | Private Member Functions | List of all members
ContentPage Class Reference

Admin_ContentPage module, ContentPage library. More...

Public Member Functions

 __construct ($mode=CAMYKS_MODE_SITE, $id=0, $params=array())
 
 get ($page=null)
 
 save ()
 
 site_get ($page)
 
 load_asFrontPage ($page)
 
 admin_get ()
 
 check_rights ()
 
 get_homeFromDatabase ()
 
 delete_fromDatabase ()
 
 delete_localesFromDatabase ()
 
 install ()
 
 is_installed ()
 
 get_fromHeader ()
 
 update_move ($newParentId)
 
 update_moveUp ()
 
 update_moveDown ()
 
 update_movePosition ($pos)
 
 set_adminData ($m)
 
 init_site ()
 
 init_admin ()
 
 has_children ()
 
 get_siteLink ($params=array(), $lg='')
 
 display ()
 
 display_module ($index)
 
 get_adminPagesTree ()
 
 get_pagesList ($lg=null, $where='')
 
 get_modelsList ($where='')
 
 get_longTitleDisplay ($encoding='')
 
 get_shortTitleDisplay ($encoding='')
 
 get_titleDisplay ($encoding='')
 
 get_configValue ($param='', $default=false)
 
 update_toVersion1_1 ()
 
 static_update_singleModuleContent ($pid, $idx, $cid)
 
 static_get_sitePages ()
 
 static_get_childrenPages ($page=0, $level=1)
 
 static_get_relativeChildrenPages ($level)
 
 static_get_listedPages ($list, $lg='')
 
 static_get_pageBasicInfoByName ($name='')
 
 static_get_pagesBasicInfoByNames ($names=array())
 
 static_get_homepageBasicInfo ()
 

Public Attributes

 $mode
 Page mode, same as CaMykS modes. More...
 
 $id = 0
 Page id. More...
 
 $name = ''
 Page symbolic name. More...
 
 $parent_id
 Parent page id. More...
 
 $position
 Sorting position in parent page children list. More...
 
 $type = 'page'
 Page type, currently unused. More...
 
 $active = 0
 Page status. More...
 
 $secured = 0
 Page has to be access with https, currently unused. More...
 
 $wf_version = 1
 Workflow version, currently unused. More...
 
 $wf_status
 Workflow status, currently unused. More...
 
 $wf_cdate
 Workflow creation date, currently unused. More...
 
 $wf_mdate
 Workflow modification date, currently unused. More...
 
 $wf_owner
 Page owner. More...
 
 $wf_editor
 Page editor group. More...
 
 $wf_validator
 Page validation group, currently unused. More...
 
 $template = ''
 Page template. More...
 
 $theme = ''
 Page theme. More...
 
 $homepage
 Is page the home page. More...
 
 $modules = array()
 Included modules. More...
 
 $metas = array()
 Page metas. More...
 
 $metas_ = ''
 Textual version of metas. More...
 
 $children = array()
 Page children. More...
 
 $params = array()
 Page parameters. More...
 
 $params_
 Textual version of page parameters. More...
 
 $_libIsInstalled
 Library installation status. More...
 
 $_libParent
 Parent module. More...
 
 $object_type = 'Module Library'
 Library object type. More...
 
 $maxmodules
 Maximum module to be inserted in page. More...
 
 $status = 200
 HTTP status of the page. More...
 

Private Member Functions

 check_data ()
 
 initialise ()
 
 get_fromDatabase ($page=null)
 
 get_firstFromDatabase ()
 
 get_objectFromDatabase ($query='')
 
 get_allVersionsFromDatabase ()
 
 get_localesFromDatabase ()
 
 create_toDatabase ()
 
 update_toDatabase ()
 
 update_contentQuery ()
 
 update_rightsQuery ()
 
 update_languages ()
 
 get_parentRights ()
 
 get_newPosition ()
 
 get_fromArray ($data)
 
 get_localeFromArray ($data)
 
 get_localesFromArray ($data)
 
 encode_metas ()
 
 decode_metas ()
 

Detailed Description

Admin_ContentPage module, ContentPage library.

Plugin / Module Library

Author
CaMykS Team camyk.nosp@m.s.co.nosp@m.ntact.nosp@m.@gma.nosp@m.il.co.nosp@m.m
Version
1.1.5.4
Date
Creation: Jun 2005
Modification: Nov 2022
Note
This program is distributed as is - WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ContentPage class.

Constructor & Destructor Documentation

◆ __construct()

ContentPage::__construct (   $mode = CAMYKS_MODE_SITE,
  $id = 0,
  $params = array() 
)

Class constructor.

Parameters
integer$mode
integer$id
array$params
Returns
void

Member Function Documentation

◆ get()

ContentPage::get (   $page = null)

Return page case of CaMykS mode.

Parameters
mixed$pagethe page to get
Returns
boolean success

◆ save()

ContentPage::save ( )

Save object.

Returns
boolean success

◆ site_get()

ContentPage::site_get (   $page)

Return object in site mode.

Parameters
mixed$pagethe page to get
Returns
boolean success

◆ load_asFrontPage()

ContentPage::load_asFrontPage (   $page)

Load object as displayed front page.

Parameters
mixed$page
Returns
boolean success

◆ admin_get()

ContentPage::admin_get ( )

Return object in admin mode.

Returns
boolean success

◆ check_rights()

ContentPage::check_rights ( )

Check admin user right on this page.

Returns
boolean result

◆ check_data()

ContentPage::check_data ( )
private

Check page data.

Returns
boolean result

◆ initialise()

ContentPage::initialise ( )
private

Initialise object.

Returns
boolean result

◆ get_fromDatabase()

ContentPage::get_fromDatabase (   $page = null)
private

Load object data from database.

Parameters
mixed$pagethe page to get
Returns
boolean success

◆ get_homeFromDatabase()

ContentPage::get_homeFromDatabase ( )

Load homepage object data from database.

Returns
boolean success

◆ get_firstFromDatabase()

ContentPage::get_firstFromDatabase ( )
private

Load first object available from database.

Returns
boolean success

◆ get_objectFromDatabase()

ContentPage::get_objectFromDatabase (   $query = '')
private

Load object data from database generic method.

Parameters
string$querysome query modification
Returns
boolean success

◆ get_allVersionsFromDatabase()

ContentPage::get_allVersionsFromDatabase ( )
private

Load all object version from database, set the latest version to the object.

Returns
boolean success

◆ get_localesFromDatabase()

ContentPage::get_localesFromDatabase ( )
private

Load object locales from database.

Returns
success

◆ create_toDatabase()

ContentPage::create_toDatabase ( )
private

Create new object to the database.

Returns
boolean success

◆ update_toDatabase()

ContentPage::update_toDatabase ( )
private

Update object to database.

Returns
boolean success

◆ update_contentQuery()

ContentPage::update_contentQuery ( )
private

Build content part for the updating query.

Returns
string the sql query part

◆ update_rightsQuery()

ContentPage::update_rightsQuery ( )
private

Build right part for the updating query.

Returns
string the sql query part

◆ update_languages()

ContentPage::update_languages ( )
private

Update object languages.

Returns
boolean success

◆ delete_fromDatabase()

ContentPage::delete_fromDatabase ( )

Delete object from database.

Returns
boolean success

◆ delete_localesFromDatabase()

ContentPage::delete_localesFromDatabase ( )

Delete object languages from database.

Returns
boolean success

◆ install()

ContentPage::install ( )

Install object table into database, add first page.

Returns
boolean success

◆ is_installed()

ContentPage::is_installed ( )

Check if object is installed in database.

Returns
boolean result

◆ get_parentRights()

ContentPage::get_parentRights ( )
private

Load parent page rights.

Returns
void

◆ get_newPosition()

ContentPage::get_newPosition ( )
private

Return next page position into page tree.

Returns
void

◆ get_fromHeader()

ContentPage::get_fromHeader ( )

Load object data from header.

Returns
void

◆ update_move()

ContentPage::update_move (   $newParentId)

Update page location.

Parameters
integer$newParentId
Returns
boolean success

◆ update_moveUp()

ContentPage::update_moveUp ( )

Update page position up.

Returns
boolean success

◆ update_moveDown()

ContentPage::update_moveDown ( )

Update page position down.

Returns
boolean success

◆ update_movePosition()

ContentPage::update_movePosition (   $pos)

Update page position with differential value.

Parameters
integer$pos
Returns
boolean success

◆ get_fromArray()

ContentPage::get_fromArray (   $data)
private

Load object data from array.

Parameters
array$data
Returns
void

◆ get_localeFromArray()

ContentPage::get_localeFromArray (   $data)
private

Load object locale data from an array.

Parameters
array$data
Returns
void

◆ get_localesFromArray()

ContentPage::get_localesFromArray (   $data)
private

Load object locales from an array.

Parameters
array$data
Returns
array

◆ encode_metas()

ContentPage::encode_metas ( )
private

Encode metas values.

Returns
void

◆ decode_metas()

ContentPage::decode_metas ( )
private

Decode meta values.

Returns
void

◆ set_adminData()

ContentPage::set_adminData (   $m)

Set up default admin page parameters.

Parameters
string$mthe module to be administrate
Returns
void

◆ init_site()

ContentPage::init_site ( )

Initialise object in site mode.

Returns
void

◆ init_admin()

ContentPage::init_admin ( )

Initialise object in admin mode.

Returns
void

◆ has_children()

ContentPage::has_children ( )

Check if page has children.

Returns
boolean result

◆ get_siteLink()

ContentPage::get_siteLink (   $params = array(),
  $lg = '' 
)

Return page object site link.

Parameters
array$params
string$lg
Returns
string

◆ display()

ContentPage::display ( )

Display object in site mode.

Returns
void

◆ display_module()

ContentPage::display_module (   $index)

Display module.

Parameters
int$index
Returns
void

◆ get_adminPagesTree()

ContentPage::get_adminPagesTree ( )

Build admin mode page tree.

Returns
array

◆ get_pagesList()

ContentPage::get_pagesList (   $lg = null,
  $where = '' 
)

Build complete page tree.

Parameters
string$lg
string$where
Returns
array

◆ get_modelsList()

ContentPage::get_modelsList (   $where = '')

Return models list.

Parameters
$where
Returns
array

◆ get_longTitleDisplay()

ContentPage::get_longTitleDisplay (   $encoding = '')

Return current page long title display.

Parameters
string$encoding
Returns
string

◆ get_shortTitleDisplay()

ContentPage::get_shortTitleDisplay (   $encoding = '')

Return current page short title display.

Parameters
string$encoding
Returns
string

◆ get_titleDisplay()

ContentPage::get_titleDisplay (   $encoding = '')

Return current page default title display.

Parameters
string$encoding
Returns
string

◆ get_configValue()

ContentPage::get_configValue (   $param = '',
  $default = false 
)

Return parent configuration object value.

Parameters
string$param
mixed$default
Returns
mixed

◆ update_toVersion1_1()

ContentPage::update_toVersion1_1 ( )

Execute version 1.1 update.

Returns
boolean success

◆ static_update_singleModuleContent()

ContentPage::static_update_singleModuleContent (   $pid,
  $idx,
  $cid 
)

Update a single module content id for a page.

Parameters
int$pidthe page id
int$idxthe module index
int$cidthe module content id
Returns
boolean success

◆ static_get_sitePages()

ContentPage::static_get_sitePages ( )

Return all pages from database.

Returns
array
Deprecated:

◆ static_get_childrenPages()

ContentPage::static_get_childrenPages (   $page = 0,
  $level = 1 
)

Return all children pages from a given page

Parameters
int$pagethe page id
int$levelthe level
Returns
array
Deprecated:

◆ static_get_relativeChildrenPages()

ContentPage::static_get_relativeChildrenPages (   $level)

Return children pages from current page.

Parameters
int$level
Returns
array
Deprecated:

◆ static_get_listedPages()

ContentPage::static_get_listedPages (   $list,
  $lg = '' 
)

Return pages from a given list.

Parameters
array$list
string$lg
Returns
void
Deprecated:

◆ static_get_pageBasicInfoByName()

ContentPage::static_get_pageBasicInfoByName (   $name = '')

Return page basic info (id, title(current_language)) from name.

Parameters
string$name
Returns
ContentPage Object
Deprecated:

◆ static_get_pagesBasicInfoByNames()

ContentPage::static_get_pagesBasicInfoByNames (   $names = array())

Return pages basic info (id, title(current_language)) from names.

Parameters
array$names
Returns
array
Deprecated:

◆ static_get_homepageBasicInfo()

ContentPage::static_get_homepageBasicInfo ( )

Return homepage basic info (id, title(current_language) and name).

Returns
ContentPage Object
Deprecated:

Member Data Documentation

◆ $mode

ContentPage::$mode

Page mode, same as CaMykS modes.

var integer $mode

◆ $id

ContentPage::$id = 0

Page id.

var integer $id

◆ $name

ContentPage::$name = ''

Page symbolic name.

var string $name

◆ $parent_id

ContentPage::$parent_id

Parent page id.

var integer $parent_id

◆ $position

ContentPage::$position

Sorting position in parent page children list.

var integer $position

◆ $type

ContentPage::$type = 'page'

Page type, currently unused.

var string $type

◆ $active

ContentPage::$active = 0

Page status.

var boolean $active

◆ $secured

ContentPage::$secured = 0

Page has to be access with https, currently unused.

var boolean $secured

◆ $wf_version

ContentPage::$wf_version = 1

Workflow version, currently unused.

var integer $wf_version

◆ $wf_status

ContentPage::$wf_status

Workflow status, currently unused.

var integer $wf_status

◆ $wf_cdate

ContentPage::$wf_cdate

Workflow creation date, currently unused.

var integer $wf_cdate

◆ $wf_mdate

ContentPage::$wf_mdate

Workflow modification date, currently unused.

var integer $wf_mdate

◆ $wf_owner

ContentPage::$wf_owner

Page owner.

var string $wf_owner

◆ $wf_editor

ContentPage::$wf_editor

Page editor group.

var string $wf_editor

◆ $wf_validator

ContentPage::$wf_validator

Page validation group, currently unused.

var string $wf_validator

◆ $template

ContentPage::$template = ''

Page template.

var string $template

◆ $theme

ContentPage::$theme = ''

Page theme.

var string $theme

◆ $homepage

ContentPage::$homepage

Is page the home page.

var boolean $homepage

◆ $modules

ContentPage::$modules = array()

Included modules.

var array $modules

◆ $metas

ContentPage::$metas = array()

Page metas.

var array $metas

◆ $metas_

ContentPage::$metas_ = ''

Textual version of metas.

var string $metas_

◆ $children

ContentPage::$children = array()

Page children.

var array $children

◆ $params

ContentPage::$params = array()

Page parameters.

var array $params

◆ $params_

ContentPage::$params_

Textual version of page parameters.

var array $params

◆ $_libIsInstalled

ContentPage::$_libIsInstalled

Library installation status.

var boolean $_libIsInstalled

◆ $_libParent

ContentPage::$_libParent

Parent module.

var boolean $_libParent

◆ $object_type

ContentPage::$object_type = 'Module Library'

Library object type.

var string $object_type

◆ $maxmodules

ContentPage::$maxmodules

Maximum module to be inserted in page.

var integer $maxmodules

◆ $status

ContentPage::$status = 200

HTTP status of the page.

var integer $status


The documentation for this class was generated from the following file: