/**
  * Init function
  * REMEMBER to feed a $clause which will filter out non-readable pages!
  *
  * @param	string		Part of where query which will filter out non-readable pages.
  * @return	void
  */
 function init($clause = '')
 {
     parent::init(' AND deleted=0 ' . $clause, 'sorting');
     if (t3lib_extMgm::isLoaded('cms')) {
         $this->fieldArray = array_merge($this->fieldArray, array('hidden', 'starttime', 'endtime', 'fe_group', 'module', 'extendToSubpages', 'nav_hide'));
     }
     $this->table = 'pages';
     $this->treeName = 'pages';
 }
 /**
  * Initialize the tree class. Needs to be overwritten
  * Will set ->fieldsArray, ->backPath and ->clause
  *
  * @param	string		record WHERE clause
  * @param	string		record ORDER BY field
  * @return	void
  */
 function setTable($table)
 {
     global $TCA, $LANG;
     $this->thisScript = t3lib_div::getIndpEnv('SCRIPT_NAME');
     $this->table = $table;
     $this->parentField = $GLOBALS['TCA'][$this->table]['ctrl']['treeParentField'];
     $this->title = $LANG->sL($GLOBALS['TCA'][$this->table]['ctrl']['title']);
     parent::init();
 }
 /**
  * Returns the root icon for a tree/mountpoint (defaults to the globe)
  *
  * @param	array		Record for root.
  * @return	string		Icon image tag.
  */
 function getRootIcon($row)
 {
     global $BACK_PATH;
     if ($this->rootIcon) {
         $icon = '<img' . t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], $this->rootIcon, 'width="18" height="16"') . ' alt="" />';
         $icon = $this->wrapIcon($icon, $row);
     } else {
         $icon = parent::getRootIcon($row);
     }
     $this->rootIconIsSet = true;
     return $icon;
 }
 /**
  * Returns the title for the input record. If blank, a "no title" labele (localized) will be returned.
  * '_title' is used for setting an alternative title for folders.
  *
  * @param	array		The input row array (where the key "_title" is used for the title)
  * @param	integer		Title length (30)
  * @return	string		The title.
  */
 function getTitleStr($row, $titleLen = 30)
 {
     return $row['_title'] ? $row['_title'] : parent::getTitleStr($row, $titleLen);
 }
 /**
  * Returns the title for the input record. If blank, a "no title" label (localized) will be returned.
  * Do NOT htmlspecialchar the string from this function - has already been done.
  *
  * @param	array		The input row array (where the key "title" is used for the title)
  * @param	integer		Title length (30)
  * @return	string		The title.
  */
 function getTitleStr($row, $titleLen = 30)
 {
     // get the basic title from the parent implementation in t3lib_treeview
     $title = parent::getTitleStr($row, $titleLen);
     if (isset($row['is_siteroot']) && $row['is_siteroot'] != 0 && $GLOBALS['BE_USER']->getTSConfigVal('options.pageTree.showDomainNameWithTitle')) {
         $rows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('domainName,sorting', 'sys_domain', 'pid=' . $GLOBALS['TYPO3_DB']->quoteStr($row['uid'] . t3lib_BEfunc::deleteClause('sys_domain') . t3lib_BEfunc::BEenableFields('sys_domain'), 'sys_domain'), '', 'sorting', 1);
         if (is_array($rows) && count($rows) > 0) {
             $title = sprintf('%s [%s]', $title, htmlspecialchars($rows[0]['domainName']));
         }
     }
     return $title;
 }
 /**
  * Init function
  * REMEMBER to feed a $clause which will filter out non-readable pages!
  *
  * @param	string		Part of where query which will filter out non-readable pages.
  * @return	void
  */
 function init($clause = '')
 {
     global $LANG, $BACK_PATH;
     parent::init(' AND deleted=0 ' . $clause, 'tx_dam_cat.sorting,tx_dam_cat.title');
     $this->table = 'tx_dam_cat';
     $this->fieldArray = array_merge($this->fieldArray, array('hidden', 'starttime', 'endtime', 'fe_group'));
     $this->parentField = 'parent_id';
     $this->treeName = 'txdamCat';
     $this->domIdPrefix = $this->treeName;
     $this->title = $LANG->sL('LLL:EXT:dam/lib/locallang.xml:categories', 1);
     $this->iconName = 'cat.gif';
     $this->iconPath = $BACK_PATH . PATH_txdam_rel . 'i/';
     #$this->clause=' AND deleted=0 ORDER BY sorting,title';
     #$this->fieldArray = Array('uid','title');
     $this->defaultList = 'uid,pid,tstamp,sorting';
     $this->ext_IconMode = '1';
     // no context menu on icons
 }