b2evolution

Multilingual multiuser multiblog engine

b2evolution Technical Documentation (Version 2.4) [ class tree: evocore ] [ index: evocore ] [ all elements ]

Class: ItemLight

Source Location: /blogs/inc/items/model/_itemlight.class.php

Class ItemLight

Inherited Properties, Constants, and Methods
Inherited Properties Inherited Methods Inherited Constants

Inherited From DataObject

DataObject::$delete_cascades
DataObject::$delete_restrictions
DataObject::$ID

Inherited From DataObject

DataObject::DataObject()
Constructor
DataObject::check_delete()
Check relations for restrictions before deleting
DataObject::check_relations()
Check relations for restrictions or cascades
DataObject::confirm_delete()
Displays form to confirm deletion of this object
DataObject::dbchange()
Records a change that will need to be updated in the db
DataObject::dbdelete()
Delete object from DB.
DataObject::dbinsert()
Insert object into DB based on previously recorded changes.
DataObject::dbsave()
Inserts or Updates depending on object state.
DataObject::dbupdate()
Update the DB based on previously recorded changes
DataObject::dget()
Get a ready-to-display member param by its name
DataObject::disp()
Display a member param by its name
DataObject::get()
Get a member param by its name
DataObject::history_info_icon()
Create icon with dataobject history
DataObject::ID()
Template function: Displays object ID.
DataObject::set()
Set param value
DataObject::set_from_Request()
Set a parameter from a Request form value.
DataObject::set_param()
Set param value.

[ Top ]
Property Summary
Blog   $Blog   The Blog of the Item (lazy filled, use get_Blog() to access it.
integer   $blog_ID   Derived from $main_cat_ID
mixed   $excerpt  
string   $issue_date   Publish date ("Y-m-d H:i:s"). This may be in the future.
integer   $main_cat_ID  
Chapter   $main_Chapter  
mixed   $mod_date  
mixed   $ptyp_ID  
mixed   $title  
string   $url   External URL the item links to (if any).
mixed   $urltitle  

[ Top ]
Method Summary
ItemLight   ItemLight()   Constructor
void   categories()   Template function: list all the category names
void   get_archive_url()   Generate a link to the post in the archives
Blog   &get_Blog()   Get the Blog object for the Item.
array   get_Chapters()   Get list of Chapter objects.
void   get_chapter_url()   Generate a link to the post in the category
string   get_excerpt()   Template function: get excerpt
void   get_issue_date()   returns issue date (datetime) of Item
Chapter   &get_main_Chapter()   Get the main Chapter.
void   get_permanent_link()   Returns a permalink link to the Item
void   get_permanent_url()   Generate the permalink for the item.
void   get_single_url()   Generate a single post link for the item
void   issue_date()   Template function: display issue date (datetime) of Item
void   issue_time()   Template function: display issue time (datetime) of Item
void   lang()   Template function: display locale for item
void   language()   Template function: display language name for item
void   load_Blog()   Load the Blog object for the Item, without returning it.
void   locale()   Template function: display locale for item
void   locale_flag()   Template tag
void   locale_temp_switch()   Template function: Temporarily switch to this post's locale
void   main_category()   Template function: display main category name
void   mod_date()   Template function: display last mod date (datetime) of Item
void   mod_time()   Template function: display last mod time (datetime) of Item
void   permanent_link()   Displays a permalink link to the Item
void   permanent_url()   Template function: display permalink for item
boolean   set()   Set param value
void   title()   Template function: display title for item and link to related URL
void   type()   Template function: display type of item

[ Top ]
Properties
Blog   $Blog [line 94]

The Blog of the Item (lazy filled, use get_Blog() to access it.

API Tags:
Access:  protected


[ Top ]
integer   $blog_ID [line 88]

Derived from $main_cat_ID

This is set at instanciation.


[ Top ]
mixed   $excerpt [line 60]

[ Top ]
string   $issue_date [line 55]

Publish date ("Y-m-d H:i:s"). This may be in the future.

This should get compared to $localtimenow.


[ Top ]
integer   $main_cat_ID = 0 [line 75]

[ Top ]
Chapter   $main_Chapter [line 79]

[ Top ]
mixed   $mod_date [line 56]

[ Top ]
mixed   $ptyp_ID [line 70]

[ Top ]
mixed   $title [line 58]

[ Top ]
string   $url [line 68]

External URL the item links to (if any).


[ Top ]
mixed   $urltitle [line 62]

[ Top ]
Methods
Constructor ItemLight  [line 110]

  ItemLight ItemLight( [object table $db_row = NULL], [string $dbtable = 'T_items__item'], [string $dbprefix = 'post_'], [string $dbIDname = 'post_ID'], [string $objtype = 'ItemLight'], [string $datecreated_field = ''], [string $datemodified_field = 'datemodified'], [string $creator_field = ''], [string $lasteditor_field = '']  )

Constructor

Parameters:
object table   $db_row:  Database row
string   $dbtable: 
string   $dbprefix: 
string   $dbIDname: 
string   $objtype:  for derived classes
string   $datecreated_field:  datetime field name
string   $datemodified_field:  datetime field name
string   $creator_field:  User ID field name
string   $lasteditor_field:  User ID field name


[ Top ]
categories  [line 326]

  void categories( [string $params = array()]  )

Template function: list all the category names

Parameters:
string   $params:  Output format for each cat, see format_to_output()


[ Top ]
get_archive_url  [line 244]

  void get_archive_url( [string $blogurl = ''], [string $glue = '&']  )

Generate a link to the post in the archives

Parameters:
string   $blogurl:  base url to use
string   $glue:  glue between url params


[ Top ]
get_Blog  [line 849]

  Blog &get_Blog( )

Get the Blog object for the Item.



Redefined in descendants as:

[ Top ]
get_Chapters  [line 416]

  array get_Chapters( )

Get list of Chapter objects.


API Tags:
Return:  of chapters (references)


[ Top ]
get_chapter_url  [line 265]

  void get_chapter_url( [string $blogurl = ''], [string $glue = '&']  )

Generate a link to the post in the category

Parameters:
string   $blogurl:  base url to use
string   $glue:  glue between url params


[ Top ]
get_excerpt  [line 790]

  string get_excerpt( [string $format = 'htmlbody']  )

Template function: get excerpt

Parameters:
string   $format:  filename to use to display more

Information Tags:
Todo:  do we want excerpts in itemLight or not?

[ Top ]
get_issue_date  [line 460]

  void get_issue_date( [ $params = array()]  )

returns issue date (datetime) of Item

Parameters:
   $params: 


[ Top ]
get_main_Chapter  [line 446]

  Chapter &get_main_Chapter( )

Get the main Chapter.



[ Top ]
get_permanent_link  [line 628]

  void get_permanent_link( [string $text = '#'], [string $title = '#'], [string $class = '']  )

Returns a permalink link to the Item

Note: If you only want the permalink URL, use Item::get_permanent_url()

Parameters:
string   $text:  link text or special value: '#', '#icon#', '#text#', '#title#' '... $title$ ...'
string   $title:  link title
string   $class:  class name


[ Top ]
get_permanent_url  [line 292]

  void get_permanent_url( [string $permalink_type = ''], [string $blogurl = ''], [string $glue = '&']  )

Generate the permalink for the item.

Note: Each item has an unique permalink at any given time. Some admin settings may however change the permalinks for previous items. Note: This actually only returns the URL, to get a real link, use Item::get_permanent_link()

Parameters:
string   $permalink_type:  single, archive, subchap
string   $blogurl:  base url to use
string   $glue:  glue between url params

Information Tags:
Todo:  archives modes in clean URL mode

[ Top ]
get_single_url  [line 167]

  void get_single_url( [boolean $allow_redir = true], [string $blogurl = ''], [string $glue = '&']  )

Generate a single post link for the item

Parameters:
boolean   $allow_redir:  allow redir to permalink, true | false | 'auto' to prevent redit only if single isn't the current permalink type
string   $blogurl:  base url to use
string   $glue:  glue between url params


[ Top ]
issue_date  [line 483]

  void issue_date( [ $params = array()]  )

Template function: display issue date (datetime) of Item

Parameters:
   $params: 


[ Top ]
issue_time  [line 493]

  void issue_time( [ $params = array()]  )

Template function: display issue time (datetime) of Item

Parameters:
   $params: 


[ Top ]
lang  [line 517]

  void lang( )

Template function: display locale for item



[ Top ]
language  [line 567]

  void language( [string $format = 'htmlbody']  )

Template function: display language name for item

Parameters:
string   $format:  Output format, see format_to_output()


[ Top ]
load_Blog  [line 865]

  void load_Blog( )

Load the Blog object for the Item, without returning it.

This is needed for Results object callbacks.



Redefined in descendants as:

[ Top ]
locale  [line 526]

  void locale( )

Template function: display locale for item



[ Top ]
locale_flag  [line 535]

  void locale_flag( [ $params = array()]  )

Template tag

Parameters:
   $params: 


[ Top ]
locale_temp_switch  [line 556]

  void locale_temp_switch( )

Template function: Temporarily switch to this post's locale



[ Top ]
main_category  [line 404]

  void main_category( [string $format = 'htmlbody']  )

Template function: display main category name

Parameters:
string   $format:  Output format, see format_to_output()


[ Top ]
mod_date  [line 581]

  void mod_date( [string $format = ''], [boolean $useGM = false]  )

Template function: display last mod date (datetime) of Item

Parameters:
string   $format:  date/time format: leave empty to use locale default date format
boolean   $useGM:  true if you want GMT


[ Top ]
mod_time  [line 596]

  void mod_time( [string $format = ''], [boolean $useGM = false]  )

Template function: display last mod time (datetime) of Item

Parameters:
string   $format:  date/time format: leave empty to use locale default time format
boolean   $useGM:  true if you want GMT


[ Top ]
permanent_link  [line 673]

  void permanent_link( [string $params = array()], string 1, string 2  )

Displays a permalink link to the Item

Note: If you only want the permalink URL, use Item::permanent_url()

Parameters:
string   1:  link title
string   2:  class name
string   $params:  link text or special value:


[ Top ]
permanent_url  [line 613]

  void permanent_url( [string $mode = ''], [string $blogurl = '']  )

Template function: display permalink for item

Note: This actually only outputs the URL, to display a real link, use Item::permanent_link()

Parameters:
string   $mode:  'post', 'archive#id' or 'archive#title'
string   $blogurl:  url to use


[ Top ]
set  [line 809]

  boolean set( string $parname, mixed $parvalue, [boolean $make_null = false]  )

Set param value

By default, all values will be considered strings

Parameters:
string   $parname:  parameter name
mixed   $parvalue:  parameter value
boolean   $make_null:  true to set to NULL if empty value

API Tags:
Return:  true, if a value has been set; false if it has not changed

Information Tags:
Todo:  extra_cat_IDs recording

Redefinition of:
DataObject::set()
Set param value

Redefined in descendants as:

[ Top ]
title  [line 699]

  void title( [ $params = array()]  )

Template function: display title for item and link to related URL

Parameters:
   $params: 


[ Top ]
type  [line 760]

  void type( [string $before = ''], [string $after = ''], [string $format = 'htmlbody']  )

Template function: display type of item

Parameters:
string   $before: 
string   $after: 
string   $format:  Output format, see format_to_output()


[ Top ]

Documentation generated on Sat, 06 Mar 2010 03:35:40 +0100 by phpDocumentor 1.4.2. This site is hosted and maintained by Daniel HAHLER (Contact).