[ Index ]
 

Code source de Plume CMS 1.2.2

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/manager/inc/ -> class.category.php (sommaire)

(pas de description)

Poids: 525 lignes (18 kb)
Inclus ou requis:0 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 1 class

Category:: (19 méthodes):
  Category()
  load()
  getAsString()
  isPathInUse()
  getPath()
  setDefaults()
  set()
  check()
  loadResources()
  getTextContent()
  getUnformattedContent()
  getFormattedContent()
  getContentFormat()
  getConnection()
  action()
  hookOnInitTemplate()
  parseQueryString()
  commit()
  remove()


Classe: Category  - X-Ref

A Category is a basic class to store the info of a category or
a list of categories.
It is similar to the Resource class.

Category($data='')   X-Ref
Constructor.


load($id='')   X-Ref
Load a category.

If no id is given, try to load from
the $this->f('category_id') value.

param: int Id of the category ('')
return: bool Success

getAsString($format='html')   X-Ref
Return the content of the category as a string ready for indexation.

param: string Format of the string ('html')
return: string The content of the category as a string

isPathInUse()   X-Ref
Check if the path is in use by another category.

return: bool In use or not

getPath($type='', $feed=false)   X-Ref
Get the path to the category.
The function is context aware. It means that depending of
the context it will return a full path or not, with nice
urls or the simple format.

param: string Force type of path ('')
param: bool Get the feed path (false)
return: string The path

setDefaults($user)   X-Ref
Set the default values for the category.

param: object User object to have the preferences
return: bool True

set($parentid, $name, $description, $format, $subject, $path,$template, $cachetime)   X-Ref
Set the data of a category.

param: int Id of the parent category
param: string Name
param: string Description
param: string Format of the description
param: string Keywords
param: string Path
param: string Template
param: string Cache time
return: bool True

check()   X-Ref
Check the integrity of the category.

The error is set if error found.

return: bool Success

loadResources()   X-Ref
Load resources in this category.

return: bool Success

getTextContent($field)   X-Ref
Get content of a field as text.
No modification of the content is performed.

param: string Field to get
return: string Content

getUnformattedContent($field)   X-Ref
Get unformatted content of a field.
It removes the content type and returns the content without
parsing.

param: string Field to get
return: string Content

getFormattedContent($field, $format='html')   X-Ref
Get parsed content.
If content is wiki, transform it as HTML, etc.

param: string Field to get
param: string Output format ('html')
return: string Formatted content

getContentFormat($field)   X-Ref
Get the format of a content.

param: string Field of the content
return: string Content format

getConnection()   X-Ref
Get a Connection object for the resource.
It reuses the main connexion object. After calling this method
a Connection object is available as $this->con
It is safe to call it many times.


action($query)   X-Ref
Action to display a category.

param: string Server query string
return: int Success code

hookOnInitTemplate($hook, $param)   X-Ref
Hook on the initialization of the templates.

param: string Name of the calling hook
param: array Default parameters (not used)
return: bool Success

parseQueryString($query)   X-Ref
Parse query string.

param: string Query string
return: array (Category path, page number)

commit()   X-Ref
Save the data into the database.

return: bool Success

remove()   X-Ref
Remove the category from the database.

return: bool Success



Généré le : Mon Nov 26 11:57:01 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics