Class P4A_DB_Navigator

Description

This widget allows a tree navigation within a P4A_DB_Source.

Note that on Opera the drag&drop feature has serious performance issues, while it's working smoothly on all other certified browsers.

Located in /p4a/objects/widgets/db_navigator.php (line 43)

P4A_Object
   |
   --P4A_Widget
      |
      --P4A_DB_Navigator
Variable Summary
Method Summary
 P4A_DB_Navigator __construct (string $name)
 P4A_DB_Navigator allowMovementToRoot ([boolean $allow = true])
 P4A_DB_Navigator allowRootsMovement ([boolean $allow = true])
 P4A_DB_Navigator collapse ([boolean $value = true])
 P4A_DB_Navigator enableSelectedElement ([boolean $enable = true])
 P4A_DB_Navigator expandAll ([boolean $value = true])
 string getAsString (unknown_type $id)
 void getPath ( $id,  $table,  $pk)
 void onClick (array $params)
 void onMovement ()
 P4A_DB_Navigator setDescription (string $field_name)
 P4A_DB_Navigator setRecursor (string $field_name)
 P4A_DB_Navigator setTrim (integer $chars)
 void _getAsString ( $id,  $all,  $obj_id,  $table,  $pk,  $current)
 void _trim (string $text)
Variables
boolean $allow_movement_to_root = false (line 91)

Allows user to create new root element (with parent_id = null)

  • access: protected
boolean $allow_roots_movement = false (line 85)

Allows user to move also the root elements

  • access: protected
string $description = "" (line 61)

The description field name

  • access: protected
boolean $enable_selected_element = false (line 97)

Is selected element clickable?

  • access: protected
boolean $expand_all = true (line 67)

Expand whole tree or collapse?

  • access: protected
string $field_to_update_on_movement = null (line 79)

When moving a record, this field is updated

  • access: protected
string $recursor = "__recursor" (line 55)

The recursion field name

  • access: protected
P4A_DB_Source $source = null (line 49)

The P4A_DB_Source used for navigation

  • access: protected
integer $trim = 0 (line 73)

Trim after this number of characters

  • access: protected

Inherited Variables

Inherited from P4A_Widget

P4A_Widget::$actions
P4A_Widget::$enabled
P4A_Widget::$label
P4A_Widget::$properties
P4A_Widget::$style
P4A_Widget::$template_name
P4A_Widget::$use_template
P4A_Widget::$visible
P4A_Widget::$_css_classes
P4A_Widget::$_temp_vars
P4A_Widget::$_tpl_vars

Inherited from P4A_Object

P4A_Object::$_helpers
P4A_Object::$_id
P4A_Object::$_map_actions
P4A_Object::$_name
P4A_Object::$_objects
P4A_Object::$_parent_id
Methods
Constructor __construct (line 102)
  • access: public
P4A_DB_Navigator __construct (string $name)
  • string $name

Redefinition of:
P4A_Widget::__construct()
allowMovement (line 183)

Enable/disable movement of setions.

Note: Movements will work only if P4A_AJAX_ENABLED is true.

  • access: public
P4A_DB_Navigator allowMovement (mixed $field)
  • mixed $field: (false|P4A_Field parent_id field on your mask)
allowMovementToRoot (line 222)

Enable/disable movement of sections to root (parent_id = null)

Note: Movements will work only if P4A_AJAX_ENABLED is true.

  • access: public
P4A_DB_Navigator allowMovementToRoot ([boolean $allow = true])
  • boolean $allow
allowRootsMovement (line 208)

Enable/disable movement of root sections (parent_id = null).

Note: Movements will work only if P4A_AJAX_ENABLED is true.

  • access: public
P4A_DB_Navigator allowRootsMovement ([boolean $allow = true])
  • boolean $allow
collapse (line 169)

Sets if the tree is collapsed or not

  • access: public
P4A_DB_Navigator collapse ([boolean $value = true])
  • boolean $value
enableSelectedElement (line 233)

Is selected element clickable?

  • access: public
P4A_DB_Navigator enableSelectedElement ([boolean $enable = true])
  • boolean $enable
expandAll (line 158)

Sets if the tree is expanded or not

  • access: public
P4A_DB_Navigator expandAll ([boolean $value = true])
  • boolean $value
getAsString (line 243)
  • access: public
string getAsString (unknown_type $id)
  • unknown_type $id

Redefinition of:
P4A_Widget::getAsString()
Returns the HTML rendered widget.
getPath (line 348)
  • access: public
void getPath ( $id,  $table,  $pk)
  • $id
  • $table
  • $pk
onClick (line 364)

OnClick event interceptor

  • access: public
void onClick (array $params)
  • array $params

Redefinition of:
P4A_Widget::onClick()
Wrapper used to add the handling of onClick action
onMovement (line 391)

Event interceptor when user moves an element to another subtree

  • access: public
void onMovement ()
setDescription (line 136)

Sets the field name used to print out the description in the tree

  • access: public
P4A_DB_Navigator setDescription (string $field_name)
  • string $field_name
setRecursor (line 125)

Sets the field name used to recursively navigate the P4A_DB_Source

  • access: public
P4A_DB_Navigator setRecursor (string $field_name)
  • string $field_name
setSource (line 114)

Sets the source of the tree, it must be a P4A_DB_Source

  • access: public
P4A_DB_Navigator setSource (P4A_DB_Source $source)
setTrim (line 147)

Trims description after x chars (0 = disabled)

  • access: public
P4A_DB_Navigator setTrim (integer $chars)
  • integer $chars: Num of chars
_getAsString (line 294)
  • access: private
void _getAsString ( $id,  $all,  $obj_id,  $table,  $pk,  $current)
  • $id
  • $all
  • $obj_id
  • $table
  • $pk
  • $current
_trim (line 376)

Trims a text after a fixed number of characters

  • access: protected
void _trim (string $text)
  • string $text

Inherited Methods

Inherited From P4A_Widget

 P4A_Widget::__construct()
 P4A_Widget::addAction()
 P4A_Widget::addAjaxAction()
 P4A_Widget::addCSSClass()
 P4A_Widget::addTempVar()
 P4A_Widget::changeEvent()
 P4A_Widget::clearTemplateVars()
 P4A_Widget::clearTempVars()
 P4A_Widget::composeStringActions()
 P4A_Widget::composeStringClass()
 P4A_Widget::composeStringProperties()
 P4A_Widget::composeStringStyle()
 P4A_Widget::disable()
 P4A_Widget::display()
 P4A_Widget::dropAction()
 P4A_Widget::dropTempVar()
 P4A_Widget::enable()
 P4A_Widget::fetchTemplate()
 P4A_Widget::getAccessKey()
 P4A_Widget::getAsString()
 P4A_Widget::getCSSClasses()
 P4A_Widget::getHeight()
 P4A_Widget::getLabel()
 P4A_Widget::getProperty()
 P4A_Widget::getStyleProperty()
 P4A_Widget::getWidth()
 P4A_Widget::isEnabled()
 P4A_Widget::isVisible()
 P4A_Widget::onBlur()
 P4A_Widget::onChange()
 P4A_Widget::onClick()
 P4A_Widget::onDblClick()
 P4A_Widget::onFocus()
 P4A_Widget::onKeyDown()
 P4A_Widget::onKeyPress()
 P4A_Widget::onKeyUp()
 P4A_Widget::onMouseDown()
 P4A_Widget::onMouseMove()
 P4A_Widget::onMouseOver()
 P4A_Widget::onMouseUp()
 P4A_Widget::onReturnPress()
 P4A_Widget::onSelect()
 P4A_Widget::redesign()
 P4A_Widget::removeCSSClass()
 P4A_Widget::requireConfirmation()
 P4A_Widget::setAccessKey()
 P4A_Widget::setBgcolor()
 P4A_Widget::setBgimage()
 P4A_Widget::setDefaultLabel()
 P4A_Widget::setFontColor()
 P4A_Widget::setFontWeight()
 P4A_Widget::setHeight()
 P4A_Widget::setInvisible()
 P4A_Widget::setLabel()
 P4A_Widget::setProperty()
 P4A_Widget::setStyleProperty()
 P4A_Widget::setVisible()
 P4A_Widget::setWidth()
 P4A_Widget::unrequireConfirmation()
 P4A_Widget::unsetProperty()
 P4A_Widget::unsetStyleProperty()
 P4A_Widget::useTemplate()

Inherited From P4A_Object

 P4A_Object::__construct()
 P4A_Object::actionHandler()
 P4A_Object::build()
 P4A_Object::destroy()
 P4A_Object::dropImplement()
 P4A_Object::dropMethod()
 P4A_Object::errorHandler()
 P4A_Object::getId()
 P4A_Object::getName()
 P4A_Object::getObjectType()
 P4A_Object::getParentID()
 P4A_Object::implement()
 P4A_Object::intercept()
 P4A_Object::isActionTriggered()
 P4A_Object::setName()
 P4A_Object::setParentID()
 P4A_Object::void()
 P4A_Object::_loadHelper()
 P4A_Object::__call()

Documentation generated on Tue, 02 Sep 2008 10:03:59 +0200 by phpDocumentor 1.4.2