Class CMS_resource_cms_aliases

Description

Class CMS_resource_cms_aliases

represent a resource of the aliases module

Located in /automne/classes/modules/cms_aliases/resource.php (line 25)

CMS_grandFather
   |
   --CMS_resource
      |
      --CMS_resource_cms_aliases
Method Summary
 void __construct ([integer $id = 0])
 boolean destroy ()
 string getAlias ()
 array getAliasLineAge ([boolean $returnObject = false], [ $reset = false])
 integer getID ()
 integer getPageID ()
 integer getParent ()
 string getPath ([boolean $withName = true], [constant $relativeTo = PATH_RELATIVETO_WEBROOT])
 string getURL ()
 array getWebsites ()
 boolean hasParent (integer $id)
 boolean hasSubAliases ()
 boolean isPermanent ()
 boolean isProtected ()
 string redirect ()
 boolean setAlias (string $alias)
 boolean setPage (CMS_page $page)
 boolean setParent (CMS_resource_cms_aliases $parent)
 boolean setPermanent (boolean $permanent)
 boolean setProtected (boolean $protected)
 boolean setReplaceURL (boolean $replace)
 boolean setURL ( $url)
 boolean setWebsites (array $websites)
 boolean urlReplaced ()
 boolean writeToPersistence ()
 boolean _checkfiles ()
 boolean _createFolder ()
 boolean _deleteFiles ()
 string _regenerate ()
Methods
Constructor __construct (line 99)

Constructor.

initializes the page if the id is given.

  • access: public
void __construct ([integer $id = 0])
  • integer $id: DB id
createRedirectionFile (line 595)

Create the redirection file (index.php) of an alias

  • return: true on success, false on failure
  • access: public
boolean createRedirectionFile ()
destroy (line 621)

Destroy an alias (folder, redirection file and DB reference)

  • return: true on success, false on failure
  • access: public
boolean destroy ()

Redefinition of:
CMS_resource::destroy()
Totally destroys the resource from persistence. Also destroys the status.
getAlias (line 153)

Gets the title of the alias

  • return: The title
  • access: public
string getAlias ()
getAliasLineAge (line 502)

Get the lineAge of an alias

  • return: or string
  • access: public
array getAliasLineAge ([boolean $returnObject = false], [ $reset = false])
  • boolean $returnObject: function return lineAge string or array of CMS_resource_cms_aliases
  • $reset
getID (line 142)

Gets the DB ID of the instance.

  • return: the DB id
  • access: public
integer getID ()

Redefinition of:
CMS_resource::getID()
Gets the DB ID of the instance.
getPageID (line 309)

Gets the redirection page ID

  • return: The ID of the page
  • access: public
integer getPageID ()
getParent (line 274)

Gets the parent

  • return: of The parent
  • access: public
integer getParent ()
getPath (line 227)

Get alias path

  • return: : the alias path
  • access: public
string getPath ([boolean $withName = true], [constant $relativeTo = PATH_RELATIVETO_WEBROOT])
  • boolean $withName: Return the alias name in path
  • constant $relativeTo: Return the alias path relative from webroot (default) or from filesystem (PATH_RELATIVETO_FILESYSTEM)
getURL (line 285)

Gets the redirection URL

  • return: the URL
  • access: public
string getURL ()
getWebsites (line 357)

Gets the websites codenames on which alias is restricted.

If none, all websites use this alias

  • return: of websites codenames
  • access: public
array getWebsites ()
hasParent (line 682)

Does this alias has the given id as parent ?

  • access: public
boolean hasParent (integer $id)
  • integer $id: The alias id to check
hasSubAliases (line 537)

alias have sub-aliases ?

  • return: true or false
  • access: public
boolean hasSubAliases ()
isPermanent (line 409)

Is this alias permanent (redirection 301) ?

  • access: public
boolean isPermanent ()
isProtected (line 431)

Is this alias protected

  • access: public
boolean isProtected ()
redirect (line 693)

Method used for compatibility with cms_aliases V1

  • access: public
string redirect ()
setAlias (line 165)

Sets the title of the alias

  • return: true on success, false on failure
  • access: public
boolean setAlias (string $alias)
  • string $alias: The title to set
setPage (line 321)

Sets the redirection page

  • return: true on success, false on failure
  • access: public
boolean setPage (CMS_page $page)
setParent (line 243)

Sets the parent

  • return: true on success, false on failure
  • access: public
boolean setParent (CMS_resource_cms_aliases $parent)
setPermanent (line 420)

Sets the permanent status

  • return: true on success, false on failure
  • access: public
boolean setPermanent (boolean $permanent)
  • boolean $permanent: : the permanent status
setProtected (line 442)

Sets the protected status

  • return: true on success, false on failure
  • access: public
boolean setProtected (boolean $protected)
  • boolean $protected: : the protected status
setReplaceURL (line 395)

Sets the replace URL status

  • return: true on success, false on failure
  • access: public
boolean setReplaceURL (boolean $replace)
  • boolean $replace: : the replace status
setURL (line 296)

Sets the redirection URL

  • return: true on success, false on failure
  • access: public
boolean setURL ( $url)
  • $url
setWebsites (line 369)

Sets the websites codename on which alias is restricted If none, all websites use this alias

  • return: true on success, false on failure
  • access: public
boolean setWebsites (array $websites)
  • array $websites: : array of websites codenames
urlReplaced (line 384)

Does this alias replace target page URL ?

  • access: public
boolean urlReplaced ()
writeToPersistence (line 453)

Writes the alias into persistence and create files if needed

  • return: true on success, false on failure
  • access: public
boolean writeToPersistence ()

Redefinition of:
CMS_resource::writeToPersistence()
Writes the resource into persistence (MySQL for now).
_checkfiles (line 560)

Create the folder of an alias

  • return: true on success, false on failure
  • access: private
boolean _checkfiles ()
_createFolder (line 576)

Create the folder of an alias

  • return: true on success, false on failure
  • access: private
boolean _createFolder ()
_deleteFiles (line 651)

Delete alias files (folder and redirection file)

  • return: true on success, false on failure
  • access: private
boolean _deleteFiles ()
_regenerate (line 703)

Regenerate alias page and all pages related to this alias

  • access: protected
string _regenerate ()

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()
Class Constants

Documentation generated on Wed, 15 Feb 2012 15:38:16 +0100 by phpDocumentor 1.4.3