Class: Item

Source Location: /CORE/system/classes/item/Item.php

Class Item

Class Overview

This is the Super Class for all Items!
Changes in here will be available in all implementing Items.



Currently used Text/Num/Date fields:
Item:

  1.  getItemText('1'getURL()
  2.  getItemNum('3')  getFlag()
  3.  getItemNum('4')  getPosition()

News:

  1.  getItemNum('1'getImageID()
  2.  getItemDate('2'getDate()

Menu:

  1.  getItemText('3'getModulID()
  2.  getItemText('4'getLayoutName()
  3.  getItemText('5'(cleaned upSearchEngine content

FutureItem:

  1.  getItemNum('5')  getAssignedUser()

Located in /CORE/system/classes/item/Item.php [line 68]

MasterItemType
   |
   --Itemtype
      |
      --Item
Author(s):
  • Kevin Papst
Information Tags:
Version:  $Id: Item.php,v 1.30 2008/12/06 12:04:48 kpapst Exp $
Copyright:  Copyright (C) Kevin Papst
License:  GNU Public License

Methods

[ Top ]
Descendants
Child Class Description
File Class used for handling BIGACE "File" Items.
Image This represents an Image Item.
Menu Class used for handling Menus.

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

Inherited From Itemtype

Itemtype::Itemtype()
Itemtype::getClass()
Itemtype::getClassName()
Itemtype::getCommand()
Itemtype::getDirectory()
Itemtype::getItemtypeID()
Itemtype::initItemtype()

Inherited From MasterItemType

MasterItemType::MasterItemType()
Empty Constructor.
MasterItemType::countItemtypes()
Returns how many Itemtypes are known by the System.
MasterItemType::getClassForItemType()
Returns a new instance of the Class for the given Itentype ID.
MasterItemType::getClassNameForItemType()
Returns the Classname for the given Itentype ID.
MasterItemType::getCommandForItemType()
Return the Command for the given Itemtype ID.
MasterItemType::getDirectoryForItemType()
Return the Directory for the given Itemtype ID.
MasterItemType::getItemTypeForCommand()
Get the Itemtype ID for the given Command (or null).
MasterItemType::getSelectColumns()
Returns the Select Columns to be used for Item- and Treeselects.

[ Top ]
Method Summary
Item   Item()   Full construtor for fetching an specified Item from the Database.
boolean   exists()   Checks whether this Item exists or not.
String   getCatchwords()   Returns the Item Catchwords.
ItemTreeWalker   getChildren()   Returns all children of this item that are available in the same language as the item.
ItemTreeWalker   getChilds()   Returns all children of this item that are available in the same language as the item.
mixed   getContent()   Fetches the Content from the linked File.
int   getCreateByID()   Returns the User ID this Item was created by.
int   getCreateDate()   Returns the Timestamp, when the Item was created.
String   getDescription()   Returns the Item Description.
String   getFullURL()   Returns the absolute Path to the Items Content File.
int   getID()   Returns the Item ID.
void   getItemDate()   Returns the desired ItemDate field.
void   getItemNum()   Returns the desired ItemNum field.
void   getItemText()   Returns the desired ItemText field.
int   getItemType()   Returns the Itemtype ID.
int   getLanguageID()   Returns the Language ID of this Item.
int   getLastByID()   Returns the ID of the last User that updated this Item.
int   getLastDate()   Returns the timestamp of the last changes on this Item (like Description or Content).
String   getMimetype()   Returns the Items Mimetype.
String   getName()   Fetch the Items Name.
String   getOriginalName()   Returns the original File Name. This MUST only work with uploaded Files.
int   getParentID()   Returns the Parents Item ID.
int   getPosition()   Returns the Position of this Item.
long   getSize()   Returns the Size of the linked File.
String   getUniqueName()   Returns the unique name, which is only a backup of the unique_name table for fast access.
String   getURL()   Returns the URL where this Items Content is stored.
long   getValidFrom()   Returns the Timestamp, from when this Item will be valid (and therefor visible).
long   getValidTo()   Returns the Timestamp, until this Item is valid (and therefor visible).
int   getViews()   Returns the amount of views for this Item.
String   getWorkflowName()   Returns the name of the configured Workflow.
boolean   hasChildren()   Checks if the Item has children in the same Language as the item.
boolean   hasChilds()   Checks if the Item has children in the same Language as the item.
boolean   isHidden()   returns whether the this items flag is set to hidden or not.
boolean   isInTrash()   returns whether this items flag set to trashed or not.
int   lastModified()   Returns the last modified date of the File (filemtime).
String   toString()   Simple toString() implementation to make debugging easier.

[ Top ]
Methods
Constructor Item  [line 87]

  Item Item( $itemtype, $id, [ $treetype = ITEM_LOAD_FULL], [ $languageID = '']  )

Full construtor for fetching an specified Item from the Database.

You should probably use an concrete implementation of this class instead!?!

Parameters:
   $itemtype: 
   $id: 
   $treetype: 
   $languageID: 


[ Top ]
exists  [line 509]

  boolean exists( )

Checks whether this Item exists or not.


API Tags:
Return:  true if the Item exists, FALSE if it is corrupt or not existing


[ Top ]
getCatchwords  [line 207]

  String getCatchwords( )

Returns the Item Catchwords.

Catchwords are a small (up to 255 Character) text value that are used within the Search!


API Tags:
Return:  the Items Cachtwords


[ Top ]
getChildren  [line 467]

  ItemTreeWalker getChildren( [String $treetype = null]  )

Returns all children of this item that are available in the same language as the item.

Parameters:
String   $treetype:  treetype the TreeType to use when fetching the Children

API Tags:
Return:  the childdren for this Item, in the Items Language


[ Top ]
getChilds  [line 456]

  ItemTreeWalker getChilds( [String $treetype = null]  )

Returns all children of this item that are available in the same language as the item.

Parameters:
String   $treetype:  treetype the TreeType to use when fetching the Children

API Tags:
Return:  the Children for this Item, in the Items Language
Deprecated:  use getChildren instead


[ Top ]
getContent  [line 437]

  mixed getContent( )

Fetches the Content from the linked File.


API Tags:
Return:  the Content (might be BINARY, HTML or simply empty)


[ Top ]
getCreateByID  [line 258]

  int getCreateByID( )

Returns the User ID this Item was created by.


API Tags:
Return:  the User ID of the Principal who created this Item


[ Top ]
getCreateDate  [line 266]

  int getCreateDate( )

Returns the Timestamp, when the Item was created.


API Tags:
Return:  the creation timestamp


[ Top ]
getDescription  [line 198]

  String getDescription( )

Returns the Item Description.


API Tags:
Return:  the Items description


[ Top ]
getFullURL  [line 344]

  String getFullURL( )

Returns the absolute Path to the Items Content File.


API Tags:
Return:  the Items full name including directory


[ Top ]
getID  [line 174]

  int getID( )

Returns the Item ID.


API Tags:
Return:  the Item ID


[ Top ]
getItemDate  [line 215]

  void getItemDate( $id  )

Returns the desired ItemDate field.

Parameters:
   $id: 

API Tags:
Access:  protected


[ Top ]
getItemNum  [line 223]

  void getItemNum( $id  )

Returns the desired ItemNum field.

Parameters:
   $id: 

API Tags:
Access:  protected


[ Top ]
getItemText  [line 234]

  void getItemText( $id  )

Returns the desired ItemText field.

Parameters:
   $id: 

API Tags:
Access:  protected


[ Top ]
getItemType  [line 166]

  int getItemType( )

Returns the Itemtype ID.


API Tags:
Return:  the Itemtype ID


[ Top ]
getLanguageID  [line 242]

  int getLanguageID( )

Returns the Language ID of this Item.


API Tags:
Return:  the Items language ID


[ Top ]
getLastByID  [line 282]

  int getLastByID( )

Returns the ID of the last User that updated this Item.


API Tags:
Return:  the User ID of the last user


[ Top ]
getLastDate  [line 274]

  int getLastDate( )

Returns the timestamp of the last changes on this Item (like Description or Content).


API Tags:
Return:  the timestamp of last changes


[ Top ]
getMimetype  [line 182]

  String getMimetype( )

Returns the Items Mimetype.


API Tags:
Return:  the Mimetype


[ Top ]
getName  [line 190]

  String getName( )

Fetch the Items Name.


API Tags:
Return:  the Items Name


[ Top ]
getOriginalName  [line 353]

  String getOriginalName( )

Returns the original File Name. This MUST only work with uploaded Files.

Otherwise it depends on the User entrys.


API Tags:
Return:  the Original Item name


[ Top ]
getParentID  [line 250]

  int getParentID( )

Returns the Parents Item ID.


API Tags:
Return:  the ID of the Parent Item


[ Top ]
getPosition  [line 291]

  int getPosition( )

Returns the Position of this Item.

The Position should be unique in this Tree.


API Tags:
Return:  the Position


[ Top ]
getSize  [line 424]

  long getSize( )

Returns the Size of the linked File.


API Tags:
Return:  the Filesize


[ Top ]
getUniqueName  [line 361]

  String getUniqueName( )

Returns the unique name, which is only a backup of the unique_name table for fast access.


API Tags:
Return:  the unique name to be used in short URLs


[ Top ]
getURL  [line 327]

  String getURL( )

Returns the URL where this Items Content is stored.


API Tags:
Return:  the Items file name


[ Top ]
getValidFrom  [line 400]

  long getValidFrom( )

Returns the Timestamp, from when this Item will be valid (and therefor visible).


API Tags:
Return:  the Timestamp from when the Item will be valid


[ Top ]
getValidTo  [line 408]

  long getValidTo( )

Returns the Timestamp, until this Item is valid (and therefor visible).


API Tags:
Return:  the Timestamp till when the Item will be valid


[ Top ]
getViews  [line 416]

  int getViews( )

Returns the amount of views for this Item.


API Tags:
Return:  the number of views


[ Top ]
getWorkflowName  [line 336]

  String getWorkflowName( )

Returns the name of the configured Workflow.


API Tags:
Return:  the Workflow Name


[ Top ]
hasChildren  [line 383]

  boolean hasChildren( )

Checks if the Item has children in the same Language as the item.


API Tags:
Return:  returns whether this Item has children or not


[ Top ]
hasChilds  [line 391]

  boolean hasChilds( )

Checks if the Item has children in the same Language as the item.


API Tags:
Return:  returns whether this Item has children or not
Deprecated:  use hasChildren instead


[ Top ]
isHidden  [line 310]

  boolean isHidden( )

returns whether the this items flag is set to hidden or not.

See FLAG_HIDDEN.


API Tags:
Return:  indicating whether this Item is hidden or not


[ Top ]
isInTrash  [line 319]

  boolean isInTrash( )

returns whether this items flag set to trashed or not.

See FLAG_TRASH.


API Tags:
Return:  indicating whether this Item is trashed or not


[ Top ]
lastModified  [line 370]

  int lastModified( )

Returns the last modified date of the File (filemtime).

Unlike

this only returns the last changes on the Items Content!


API Tags:
Return:  the last modified timestamp


[ Top ]
toString  [line 541]

  String toString( )

Simple toString() implementation to make debugging easier.


API Tags:
Return:  a String representation of this Item, naming all important values


[ Top ]