[ Index ]

PHP Cross Reference of Joomla 1.5.26 DE

title

Body

[close]

/plugins/content/ -> example.php (summary)

(no description)

Copyright: Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
License: GNU/GPL, see LICENSE.php
Version: $Id: example.php 14401 2010-01-26 14:10:00Z louis $
File Size: 148 lines (4 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

plgContentExample:: (7 methods):
  plgContentExample()
  onPrepareContent()
  onAfterDisplayTitle()
  onBeforeDisplayContent()
  onAfterDisplayContent()
  onBeforeContentSave()
  onAfterContentSave()


Class: plgContentExample  - X-Ref

Example Content Plugin

plgContentExample( &$subject, $params )   X-Ref
Constructor

For php4 compatability we must not use the __constructor as a constructor for plugins
because func_get_args ( void ) returns a copy of all passed arguments NOT references.
This causes problems with cross-referencing necessary for the observer design pattern.

param: object $subject The object to observe
param: object $params  The object that holds the plugin parameters

onPrepareContent( &$article, &$params, $limitstart )   X-Ref
Example prepare content method

Method is called by the view

param: object        The article object.  Note $article->text is also available
param: object        The article params
param: int            The 'page' number

onAfterDisplayTitle( &$article, &$params, $limitstart )   X-Ref
Example after display title method

Method is called by the view and the results are imploded and displayed in a placeholder

param: object        The article object.  Note $article->text is also available
param: object        The article params
param: int            The 'page' number
return: string

onBeforeDisplayContent( &$article, &$params, $limitstart )   X-Ref
Example before display content method

Method is called by the view and the results are imploded and displayed in a placeholder

param: object        The article object.  Note $article->text is also available
param: object        The article params
param: int            The 'page' number
return: string

onAfterDisplayContent( &$article, &$params, $limitstart )   X-Ref
Example after display content method

Method is called by the view and the results are imploded and displayed in a placeholder

param: object        The article object.  Note $article->text is also available
param: object        The article params
param: int            The 'page' number
return: string

onBeforeContentSave( &$article, $isNew )   X-Ref
Example before save content method

Method is called right before content is saved into the database.
Article object is passed by reference, so any changes will be saved!
NOTE:  Returning false will abort the save with an error.
You can set the error by calling $article->setError($message)

param: object        A JTableContent object
param: bool        If the content is just about to be created
return: bool        If false, abort the save

onAfterContentSave( &$article, $isNew )   X-Ref
Example after save content method
Article is passed by reference, but after the save, so no changes will be saved.
Method is called right after the content is saved

param: object        A JTableContent object
param: bool        If the content is just about to be created
return: void



Generated: Wed Mar 28 15:54:07 2012 Cross-referenced by PHPXref 0.7.1