phpDocumentor sfW3studioCMSPlugin
w3sContentManager
[ class tree: sfW3studioCMSPlugin ] [ index: sfW3studioCMSPlugin ] [ all elements ]

Class: w3sContentManager

Source Location: /lib/w3studioCmsCore/content/w3sContentManager.class.php

Class w3sContentManager

Class Overview

w3sContentManager is the base class to manages the contents of a web page.

This class contains the base methods to add, edit and delete a content on the web page and the base methods to display a content on the page, when it have to be displayed in editor, preview and publish mode.

A new content should inherit from this class.

Located in /lib/w3studioCmsCore/content/w3sContentManager.class.php [line 28]

w3sTemplateEngine
   |
   --w3sTemplateEngineEditor
      |
      --w3sContentManager
Author(s): API Tags:
Abstract:  

Information Tags:

Properties

Methods

[ Top ]
Descendants
Child Class Description
BaseW3sContentManagerImage BaseW3sContentManagerImage is the base class to manage an image content.
BaseW3sContentManagerMenu BaseW3sContentManagerMenu is the base class to manage a navigation menu content.
BaseW3sContentManagerScript BaseW3sContentManagerScript is the base class to manage a server-side or client-side script content.
w3sContentManagerFlash w3sContentManagerFlash extends the w3sContentManager to represent a flash content. This object has a minimal interface and will be implemented in the future.
w3sContentManagerLanguagesMenu w3sContentManagerLanguagesMenu is the base class to represents the
w3sContentManagerText w3sContentManagerText extends the w3sContentManager to represent a text content.

[ Top ]
Inherited Properties, Constants, and Methods
Inherited Properties Inherited Methods Inherited Constants

Inherited From w3sTemplateEngineEditor

w3sTemplateEngineEditor::$editorEvents
w3sTemplateEngineEditor::$interactiveMenuEvents
w3sTemplateEngineEditor::$interactiveMenus
w3sTemplateEngineEditor::$slotContents
w3sTemplateEngineEditor::$sortables

Inherited From w3sTemplateEngine

w3sTemplateEngine::$idLanguage
w3sTemplateEngine::$idPage
w3sTemplateEngine::$idTemplate
w3sTemplateEngine::$languageName
w3sTemplateEngine::$pageContents
w3sTemplateEngine::$pageName
w3sTemplateEngine::$projectName
w3sTemplateEngine::$templateFileName
w3sTemplateEngine::$templateName

Inherited From w3sTemplateEngineEditor

w3sTemplateEngineEditor::__construct()
w3sTemplateEngineEditor::drawSlot()
Draws the contents' slot when in editor contents.
w3sTemplateEngineEditor::getEditorEvents()
w3sTemplateEngineEditor::getInteractiveMenuEvents()
w3sTemplateEngineEditor::getInteractiveMenus()
w3sTemplateEngineEditor::getSortables()
w3sTemplateEngineEditor::renderPage()
Overrides the standard function
w3sTemplateEngineEditor::setInteractiveMenu()
w3sTemplateEngineEditor::setInteractiveMenus()
w3sTemplateEngineEditor::setSortables()
Set the sortables for moving contents through the webpage

Inherited From w3sTemplateEngine

w3sTemplateEngine::__construct()
Constructor.
w3sTemplateEngine::drawSlot()
w3sTemplateEngine::findStylesheetClasses()
Returns the available classes for a given slot. Can retrieve only the class name or the full CSS style. This behaviour depend on the mode parameter
w3sTemplateEngine::getIdLanguage()
w3sTemplateEngine::getIdPage()
w3sTemplateEngine::getLanguageName()
w3sTemplateEngine::getPageContents()
w3sTemplateEngine::getPageName()
w3sTemplateEngine::getSlotContents()
Returns the page's contents grouped by slots, retrieved from database
w3sTemplateEngine::getStylesheetsFromContents()
Returns the template's stylesheets
w3sTemplateEngine::getTemplateFile()
Returns the template file path.
w3sTemplateEngine::isPageFree()
Checks if the requested page is not in use from another user, and free the previous page used by current user.
w3sTemplateEngine::removeStylesheetsFromTemplate()
Removes the stylesheets reference from the template
w3sTemplateEngine::renderCopyright()
Renders the W3StudioCMS Copyright button.
w3sTemplateEngine::renderPage()
Renders the page
w3sTemplateEngine::retrieveSiteStylesheets()
Reads all the site's template files and extracts the stylesheets' references.
w3sTemplateEngine::retrieveTemplateAttributesFromPage()
Retrieves from an instance of the page object the informations about the template used in the current page.
w3sTemplateEngine::retrieveTemplateStylesheets()
Retrieves the stylesheets used by the current template. The result string will be uses to change the template's stylesheet.
w3sTemplateEngine::setCurrentTemplate()
Retrieves from the database the template associated to page requested
w3sTemplateEngine::setIdLanguage()
w3sTemplateEngine::setIdPage()
w3sTemplateEngine::setTemplateInfo()

[ Top ]
Property Summary
mixed   $className  
mixed   $content  
mixed   $defaultInteractiveMenu  
mixed   $defaultParams  
mixed   $errors  
mixed   $exceptionMessage  
mixed   $updateForeigns  

[ Top ]
Method Summary
w3sContentManager   __construct()   Constructor.
int   add()   Adds a content.
int   delete()   Deletes a content. The content will be marked for deletion but it will be really deleted from the database when the pages will be published
string   displayError()   Returns the html error message that corresponds to a predefined error number
int   edit()   Edits a content.
array   formatContent()   The default behaviour of the formatContent function is "Nothing to do", so the content array will be returned untouched .
int   getClassName()   Returns the value of the className variable.
object   getContent()   Returns the value of the content variable.
string   getDefaultInteractiveMenu()   Returns the value of the default interactiveMenu.
string   getDefaultValue()   Returns the default text for the text content
string   getDisplayContentForEditorMode()   Returns the content formatted to be correctly displayed in the editor mode.
string   getDisplayContentForPreviewMode()   Returns the content formatted to be correctly displayed in the preview mode.
string   getDisplayContentForPublishMode()   Returns the content formatted to be correctly displayed in the editor mode.
string   getEditorName()   Returns the name used by the w3sEditorFactory class to render the editor.
string   getExceptionMessage()   Returns the value of the exceptionMessage variable.
string   getInteractiveMenu()   Returns the Interactive Menu used to manage the editor. This gives you a chance to add the reference to javascript editor which manages the content.
void   getRelatedElements()  
bool   getUpdateForeigns()   Returns the value of the updateForeigns variable.
bool   makeSpace()   Makes a space between contents, moving their positions of one unit up or down, according to the op param
string   redraw()   Redraws all the contents that belongs to the current slot.
void   setClassName()   Sets the value of the className variable.
void   setContent()   Sets the value of the content variable.
void   setDefaultInteractiveMenu()   Sets the default interactiveMenu.
void   setDefaultRelatedElements()  
array   setExceptionError()   The this->errors' array zero key is reserved for exceptions. Here is filled
void   setExceptionMessage()   Sets the value of the exceptionMessage variable.
void   setMessageErrors()   setMessageErrors. Fills the standard error messages
void   setUpdateForeigns()   Sets the value of the updateForeigns variable.

[ Top ]
Properties
mixed   $className [line 33]
API Tags:
Access:  protected


[ Top ]
mixed   $content [line 31]
API Tags:
Access:  protected


[ Top ]
mixed   $defaultInteractiveMenu [line 44]
API Tags:
Access:  protected


[ Top ]
mixed   $defaultParams = array('LanguageId' => '0',
'PageId' => '0',
'SlotId' => '0',
'GroupId' => '0',
'ClassName' => '',
'Content' => '',
'ContentPosition' => '0',
'Edited' => '1')
[line 36]
API Tags:
Access:  protected


[ Top ]
mixed   $errors = array() [line 44]
API Tags:
Access:  protected


[ Top ]
mixed   $exceptionMessage [line 32]
API Tags:
Access:  protected


[ Top ]
mixed   $updateForeigns = true [line 31]
API Tags:
Access:  protected


[ Top ]
Methods
Constructor __construct  [line 77]

  w3sContentManager __construct( int $className, [object The $content = null]  )

Constructor.

Parameters:
int   $className:  The content's type
object The   $content:  w3sContent object. Can be null when adding

API Tags:
Access:  public


Redefinition of:
w3sTemplateEngineEditor::__construct()

Redefined in descendants as:

[ Top ]
add  [line 214]

  int add( object The $param  )

Adds a content.

Parameters:
object The   $param:  content placed over the adding content

API Tags:
Return:  - 1 success / xx The error message number
Access:  public


[ Top ]
delete  [line 391]

  int delete( [int $op = 1]  )

Deletes a content. The content will be marked for deletion but it will be really deleted from the database when the pages will be published

Parameters:
int   $op:  optional the operation to do.
    1. [Default] Marks the content for deletion

    API Tags:
    Return:  1 success / xx The error message number
    Access:  public


    [ Top ]
    displayError  [line 543]

      string displayError( int $errorNumber, [bool $showExtraInfo = false]  )

    Returns the html error message that corresponds to a predefined error number

    Parameters:
    int   $errorNumber:  The error number.
    bool   $showExtraInfo:  optional If true displays extra information

    API Tags:
    Access:  public


    [ Top ]
    edit  [line 318]

      int edit( array $params  )

    Edits a content.

    Parameters:
    array   $params:  An array with the values to edit.

    API Tags:
    Return:  - 1 success / xx The error message number
    Access:  public


    [ Top ]
    formatContent  [line 659]

      array formatContent( array $contentValues  )

    The default behaviour of the formatContent function is "Nothing to do", so the content array will be returned untouched .

    Parameters:
    array   $contentValues:  The array with contents.

    API Tags:
    Return:  The array with contents formatted.
    Access:  protected


    Redefined in descendants as:

    [ Top ]
    getClassName  [line 124]

      int getClassName( )

    Returns the value of the className variable.


    API Tags:
    Access:  public


    [ Top ]
    getContent  [line 157]

      object getContent( )

    Returns the value of the content variable.


    API Tags:
    Access:  public


    [ Top ]
    getDefaultInteractiveMenu  [line 102]

      string getDefaultInteractiveMenu( )

    Returns the value of the default interactiveMenu.


    API Tags:
    Access:  public


    [ Top ]
    getDefaultValue  [line 59]

      string getDefaultValue( )

    Returns the default text for the text content


    API Tags:
    Abstract:  


    Redefined in descendants as:

    [ Top ]
    getDisplayContentForEditorMode  [line 454]

      string getDisplayContentForEditorMode( )

    Returns the content formatted to be correctly displayed in the editor mode.

    The default value returned is simply the stored content.


    API Tags:
    Access:  public


    Redefined in descendants as:

    [ Top ]
    getDisplayContentForPreviewMode  [line 474]

      string getDisplayContentForPreviewMode( )

    Returns the content formatted to be correctly displayed in the preview mode.

    The default value returned is the stored content with its links formatted to open the pages with ajax.


    API Tags:
    Access:  public


    Redefined in descendants as:

    [ Top ]
    getDisplayContentForPublishMode  [line 486]

      string getDisplayContentForPublishMode( )

    Returns the content formatted to be correctly displayed in the editor mode.

    The default value returned is simply the stored content.


    API Tags:
    Access:  public


    Redefined in descendants as:

    [ Top ]
    getEditorName  [line 135]

      string getEditorName( )

    Returns the name used by the w3sEditorFactory class to render the editor.


    API Tags:
    Access:  public


    Redefined in descendants as:

    [ Top ]
    getExceptionMessage  [line 201]

      string getExceptionMessage( )

    Returns the value of the exceptionMessage variable.


    API Tags:
    Access:  public


    [ Top ]
    getInteractiveMenu  [line 68]

      string getInteractiveMenu( )

    Returns the Interactive Menu used to manage the editor. This gives you a chance to add the reference to javascript editor which manages the content.


    API Tags:
    Abstract:  


    Redefined in descendants as:

    [ Top ]
    getRelatedElements  [line 555]

      void getRelatedElements( )


    API Tags:
    Access:  public


    Redefined in descendants as:

    [ Top ]
    getUpdateForeigns  [line 179]

      bool getUpdateForeigns( )

    Returns the value of the updateForeigns variable.


    API Tags:
    Access:  public


    [ Top ]
    makeSpace  [line 573]

      bool makeSpace( array $params, str $op  )

    Makes a space between contents, moving their positions of one unit up or down, according to the op param

    Parameters:
    array   $params:  An array with the following keys: array("PageId" => value, "SlotId" => value, "LanguageId" => value, "ContentPosition" => value)
    str   $op:  The operation to do. Permitted values are "add - del"

    API Tags:
    Access:  protected


    [ Top ]
    redraw  [line 496]

      string redraw( )

    Redraws all the contents that belongs to the current slot.


    API Tags:
    Return:  An html string with the slot's contents.
    Access:  public


    [ Top ]
    setClassName  [line 113]

      void setClassName( int $value  )

    Sets the value of the className variable.

    Parameters:
    int   $value: 

    API Tags:
    Access:  public


    [ Top ]
    setContent  [line 146]

      void setContent( object $value  )

    Sets the value of the content variable.

    Parameters:
    object   $value: 

    API Tags:
    Access:  public


    [ Top ]
    setDefaultInteractiveMenu  [line 91]

      void setDefaultInteractiveMenu( string $value  )

    Sets the default interactiveMenu.

    Parameters:
    string   $value: 

    API Tags:
    Access:  public


    [ Top ]
    setDefaultRelatedElements  [line 557]

      void setDefaultRelatedElements( )


    API Tags:
    Access:  protected


    Redefined in descendants as:

    [ Top ]
    setExceptionError  [line 671]

      array setExceptionError( string $exception  )

    The this->errors' array zero key is reserved for exceptions. Here is filled

    Parameters:
    string   $exception:  The exception message.

    API Tags:
    Return:  The formatted exception message.
    Access:  protected


    [ Top ]
    setExceptionMessage  [line 190]

      void setExceptionMessage( string $value  )

    Sets the value of the exceptionMessage variable.

    Parameters:
    string   $value: 

    API Tags:
    Access:  public


    [ Top ]
    setMessageErrors  [line 644]

      void setMessageErrors( )

    setMessageErrors. Fills the standard error messages


    API Tags:
    Access:  protected


    [ Top ]
    setUpdateForeigns  [line 168]

      void setUpdateForeigns( bool $value  )

    Sets the value of the updateForeigns variable.

    Parameters:
    bool   $value: 

    API Tags:
    Access:  public


    [ Top ]

    Documentation generated on Tue, 11 Aug 2009 14:53:51 +0200 by phpDocumentor 1.4.0