Main Page | Directories | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages | Examples

localPageTree Class Reference

Inherits t3lib_pageTree, t3lib_pageTree, t3lib_browseTree, and t3lib_browseTree.

Inherited by localPageTree::rtePageTree.

List of all members.

Public Member Functions

 localPageTree ()
 Calls init functions.
 wrapIcon ($icon, &$row)
 Wrapping icon in browse tree.
 wrapStop ($str, $row)
 Adds a red "+" to the input string, $str, if the field "php_tree_stop" in the $row (pages) is set.
 localPageTree ()
 Constructor.
 wrapTitle ($title, $v, $ext_pArrPages='')
 Wrapping the title in a link, if applicable.
 printTree ($treeArr='')
 Create the page navigation tree in HTML.
 ext_isLinkable ($doktype, $uid)
 Returns true if a doktype can be linked.
 PM_ATagWrap ($icon, $cmd, $bMark='')
 Wrap the plus/minus icon in a link.
 wrapIcon ($icon, $row)
 Wrapping the image tag, $icon, for the row, $row.
 wrapIcon ($icon, $row)
 Inserting uid-information in title-text for an icon.
 expandNext ($id)
 Determines whether to expand a branch or not.
 wrapIcon ($icon, $row)
 Inserting uid-information in title-text for an icon.

Public Attributes

 $ext_showPageId
 $ext_IconMode


Constructor & Destructor Documentation

localPageTree::localPageTree  ) 
 

Calls init functions.

Returns:
void

Definition at line 87 of file alt_db_navframe.php.

References t3lib_browseTree::init().

00087                             {
00088       $this->init();
00089    }

localPageTree::localPageTree  ) 
 

Constructor.

Just calling init()

Returns:
void

Definition at line 261 of file browse_links.php.

00261                             {
00262       $this->init();
00263 
00264       $this->clause = ' AND doktype!=255'.$this->clause;
00265    }


Member Function Documentation

localPageTree::expandNext id  ) 
 

Determines whether to expand a branch or not.

Here the branch is expanded if the current id matches the global id for the listing/new

Parameters:
integer The ID (page id) of the element
Returns:
boolean Returns true if the IDs matches

Reimplemented from t3lib_pageTree.

Definition at line 110 of file db_new.php.

00110                               {
00111       return $id==$GLOBALS['SOBE']->id ? 1 : 0;
00112    }

localPageTree::ext_isLinkable doktype,
uid
 

Returns true if a doktype can be linked.

Parameters:
integer Doktype value to test
integer uid to test.
Returns:
boolean

Definition at line 340 of file browse_links.php.

00340                                           {
00341       if ($uid && $doktype<199)  {
00342          return true;
00343       }
00344    }

localPageTree::PM_ATagWrap icon,
cmd,
bMark = ''
 

Wrap the plus/minus icon in a link.

Parameters:
string HTML string to wrap, probably an image tag.
string Command for 'PM' get var
boolean If set, the link will have a anchor point (=$bMark) and a name attribute (=$bMark)
Returns:
string Link-wrapped input string

Definition at line 354 of file browse_links.php.

00354                                                 {
00355       if ($bMark) {
00356          $anchor = '#'.$bMark;
00357          $name=' name="'.$bMark.'"';
00358       }
00359       $aOnClick = "return jumpToUrl('".$this->script.'?PM='.$cmd."','".$anchor."');";
00360 
00361       return '<a href="#"'.$name.' onclick="'.htmlspecialchars($aOnClick).'">'.$icon.'</a>';
00362    }

localPageTree::printTree treeArr = ''  ) 
 

Create the page navigation tree in HTML.

Parameters:
array Tree array
Returns:
string HTML output.

Definition at line 290 of file browse_links.php.

00290                                     {
00291       $titleLen=intval($GLOBALS['BE_USER']->uc['titleLen']);
00292       if (!is_array($treeArr))   $treeArr=$this->tree;
00293 
00294       $out='';
00295       $c=0;
00296 
00297       foreach($treeArr as $k => $v) {
00298          $c++;
00299          $bgColorClass = ($c+1)%2 ? 'bgColor' : 'bgColor-10';
00300          if ($GLOBALS['SOBE']->curUrlInfo['act']=='page' && $GLOBALS['SOBE']->curUrlInfo['pageid']==$v['row']['uid'] && $GLOBALS['SOBE']->curUrlInfo['pageid'])   {
00301             $arrCol='<td><img'.t3lib_iconWorks::skinImg('','gfx/blinkarrow_right.gif','width="5" height="9"').' class="c-blinkArrowR" alt="" /></td>';
00302             $bgColorClass='bgColor4';
00303          } else {
00304             $arrCol='<td></td>';
00305          }
00306 
00307          $aOnClick = 'return jumpToUrl(\''.$this->script.'?act='.$GLOBALS['SOBE']->act.'&mode='.$GLOBALS['SOBE']->mode.'&expandPage='.$v['row']['uid'].'\');';
00308          $cEbullet = $this->ext_isLinkable($v['row']['doktype'],$v['row']['uid']) ?
00309                   '<a href="#" onclick="'.htmlspecialchars($aOnClick).'"><img'.t3lib_iconWorks::skinImg('','gfx/ol/arrowbullet.gif','width="18" height="16"').' alt="" /></a>' :
00310                   '';
00311          $out.='
00312             <tr class="'.$bgColorClass.'">
00313                <td nowrap="nowrap">'.
00314                $v['HTML'].
00315                $this->wrapTitle($this->getTitleStr($v['row'],$titleLen),$v['row'],$this->ext_pArrPages).
00316                '</td>'.
00317                $arrCol.
00318                '<td>'.$cEbullet.'</td>
00319             </tr>';
00320       }
00321       $out='
00322 
00323 
00324          <!--
00325             Navigation Page Tree:
00326          -->
00327          <table border="0" cellpadding="0" cellspacing="0" id="typo3-tree">
00328             '.$out.'
00329          </table>';
00330       return $out;
00331    }

localPageTree::wrapIcon icon,
row
 

Inserting uid-information in title-text for an icon.

Parameters:
string Icon image
array Item row
Returns:
string Wrapping icon image.

Reimplemented from t3lib_browseTree.

Definition at line 105 of file move_el.php.

00105                                  {
00106       return $this->addTagAttributes($icon,' title="id='.htmlspecialchars($row['uid']).'"');
00107    }

localPageTree::wrapIcon icon,
row
 

Inserting uid-information in title-text for an icon.

Parameters:
string Icon image
array Item row
Returns:
string Wrapping icon image.

Reimplemented from t3lib_browseTree.

Definition at line 99 of file db_new.php.

00099                                  {
00100       return $this->addTagAttributes($icon,' title="id='.htmlspecialchars($row['uid']).'"');
00101    }

localPageTree::wrapIcon icon,
row
 

Wrapping the image tag, $icon, for the row, $row.

Parameters:
string The image tag for the icon
array The row for the current element
Returns:
string The processed icon input value.

Reimplemented from t3lib_browseTree.

Definition at line 371 of file browse_links.php.

00371                                  {
00372       return $this->addTagAttributes($icon,' title="id='.$row['uid'].'"');
00373    }

localPageTree::wrapIcon icon,
&$  row
 

Wrapping icon in browse tree.

Parameters:
string Icon IMG code
array Data row for element.
Returns:
string Page icon

Definition at line 98 of file alt_db_navframe.php.

References t3lib_BEfunc::isRecordLocked().

00098                                     {
00099          // If the record is locked, present a warning sign.
00100       if ($lockInfo=t3lib_BEfunc::isRecordLocked('pages',$row['uid']))  {
00101          $aOnClick = 'alert('.$GLOBALS['LANG']->JScharCode($lockInfo['msg']).');return false;';
00102          $lockIcon='<a href="#" onclick="'.htmlspecialchars($aOnClick).'">'.
00103             '<img'.t3lib_iconWorks::skinImg('','gfx/recordlock_warning3.gif','width="17" height="12"').' title="'.htmlspecialchars($lockInfo['msg']).'" alt="" />'.
00104             '</a>';
00105       } else $lockIcon = '';
00106 
00107          // Add title attribute to input icon tag
00108       $thePageIcon = $this->addTagAttributes($icon, $this->titleAttrib.'="'.$this->getTitleAttrib($row).'"');
00109 
00110          // Wrap icon in click-menu link.
00111       if (!$this->ext_IconMode)  {
00112          $thePageIcon = $GLOBALS['TBE_TEMPLATE']->wrapClickMenuOnIcon($thePageIcon,'pages',$row['uid'],0,'&bank='.$this->bank);
00113       } elseif (!strcmp($this->ext_IconMode,'titlelink'))   {
00114          $aOnClick = 'return jumpTo(\''.$this->getJumpToParam($row).'\',this,\''.$this->treeName.'\');';
00115          $thePageIcon='<a href="#" onclick="'.htmlspecialchars($aOnClick).'">'.$thePageIcon.'</a>';
00116       }
00117 
00118          // Add Page ID:
00119       if ($this->ext_showPageId) {
00120          $pageIdStr = '['.$row['uid'].']&nbsp;';
00121       } else {
00122          $pageIdStr = '';
00123       }
00124 
00125       return $thePageIcon.$lockIcon.$pageIdStr;
00126    }

localPageTree::wrapStop str,
row
 

Adds a red "+" to the input string, $str, if the field "php_tree_stop" in the $row (pages) is set.

Parameters:
string Input string, like a page title for the tree
array record row with "php_tree_stop" field
Returns:
string Modified string private

Definition at line 136 of file alt_db_navframe.php.

00136                                  {
00137       if ($row['php_tree_stop']) {
00138          $str.='<a href="'.htmlspecialchars(t3lib_div::linkThisScript(array('setTempDBmount' => $row['uid']))).'" class="typo3-red">+</a> ';
00139       }
00140       return $str;
00141    }

localPageTree::wrapTitle title,
v,
ext_pArrPages = ''
 

Wrapping the title in a link, if applicable.

Parameters:
string Title, (must be ready for output, that means it must be htmlspecialchars()'ed).
array The record
boolean (Ignore)
Returns:
string Wrapping title string.

Definition at line 275 of file browse_links.php.

00275                                                    {
00276       if ($this->ext_isLinkable($v['doktype'],$v['uid']))   {
00277          $aOnClick = "return link_typo3Page('".$v['uid']."');";
00278          return '<a href="#" onclick="'.htmlspecialchars($aOnClick).'">'.$title.'</a>';
00279       } else {
00280          return '<span style="color: #666666;">'.$title.'</span>';
00281       }
00282    }


Member Data Documentation

localPageTree::$ext_IconMode
 

Definition at line 80 of file alt_db_navframe.php.

localPageTree::$ext_showPageId
 

Definition at line 79 of file alt_db_navframe.php.


The documentation for this class was generated from the following files:
Generated on Sun Oct 3 01:06:26 2004 for TYPO3core 3.7.0 dev by  doxygen 1.3.8-20040913