本文整理汇总了PHP中t3lib_div::_GP方法的典型用法代码示例。如果您正苦于以下问题:PHP t3lib_div::_GP方法的具体用法?PHP t3lib_div::_GP怎么用?PHP t3lib_div::_GP使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类t3lib_div
的用法示例。
在下文中一共展示了t3lib_div::_GP方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getSortingLinks
protected function getSortingLinks()
{
$sortHelper = t3lib_div::makeInstance('Tx_Solr_Sorting', $this->configuration['search.']['sorting.']['options.']);
$query = $this->search->getQuery();
$queryLinkBuilder = t3lib_div::makeInstance('Tx_Solr_Query_LinkBuilder', $query);
$queryLinkBuilder->setLinkTargetPageId($this->parentPlugin->getLinkTargetPageId());
$sortOptions = array();
$urlParameters = t3lib_div::_GP('tx_solr');
$urlSortParameters = t3lib_div::trimExplode(',', $urlParameters['sort']);
$configuredSortOptions = $sortHelper->getSortOptions();
foreach ($configuredSortOptions as $sortOptionName => $sortOption) {
$sortDirection = $this->configuration['search.']['sorting.']['defaultOrder'];
if (!empty($this->configuration['search.']['sorting.']['options.'][$sortOptionName . '.']['defaultOrder'])) {
$sortDirection = $this->configuration['search.']['sorting.']['options.'][$sortOptionName . '.']['defaultOrder'];
}
$sortIndicator = $sortDirection;
$currentSortOption = '';
$currentSortDirection = '';
foreach ($urlSortParameters as $urlSortParameter) {
$explodedUrlSortParameter = explode(' ', $urlSortParameter);
if ($explodedUrlSortParameter[0] == $sortOptionName) {
list($currentSortOption, $currentSortDirection) = $explodedUrlSortParameter;
break;
}
}
// toggle sorting direction for the current sorting field
if ($currentSortOption == $sortOptionName) {
switch ($currentSortDirection) {
case 'asc':
$sortDirection = 'desc';
$sortIndicator = 'asc';
break;
case 'desc':
$sortDirection = 'asc';
$sortIndicator = 'desc';
break;
}
}
if (!empty($this->configuration['search.']['sorting.']['options.'][$sortOptionName . '.']['fixedOrder'])) {
$sortDirection = $this->configuration['search.']['sorting.']['options.'][$sortOptionName . '.']['fixedOrder'];
}
$sortParameter = $sortOptionName . ' ' . $sortDirection;
$temp = array('link' => $queryLinkBuilder->getQueryLink($sortOption['label'], array('sort' => $sortParameter)), 'url' => $queryLinkBuilder->getQueryUrl(array('sort' => $sortParameter)), 'optionName' => $sortOptionName, 'field' => $sortOption['field'], 'label' => $sortOption['label'], 'is_current' => '0', 'direction' => $sortDirection, 'indicator' => $sortIndicator, 'current_direction' => ' ');
// set sort indicator for the current sorting field
if ($currentSortOption == $sortOptionName) {
$temp['selected'] = 'selected="selected"';
$temp['current'] = 'current';
$temp['is_current'] = '1';
$temp['current_direction'] = $sortIndicator;
}
// special case relevance: just reset the search to normal behavior
if ($sortOptionName == 'relevance') {
$temp['link'] = $queryLinkBuilder->getQueryLink($sortOption['label'], array('sort' => NULL));
$temp['url'] = $queryLinkBuilder->getQueryUrl(array('sort' => NULL));
unset($temp['direction'], $temp['indicator']);
}
$sortOptions[] = $temp;
}
return $sortOptions;
}
示例2: saveRecord
/**
* userFunc on save of the record
* @param $conf
*/
function saveRecord($conf)
{
//print "TEST";
//t3lib_div::print_array($conf);
//check loaded LL
if (!$this->LOCAL_LANG_loaded) {
$this->user_dmailsubscribe();
}
if (intval($conf['rec']['uid'])) {
$fe = t3lib_div::_GP('FE');
$newFieldsArr = $fe['tt_address']['module_sys_dmail_category'];
//$newFields = implode(',',$newFieldsArr);
//print "NewFields: $newFields<br />";
$count = 0;
$GLOBALS['TYPO3_DB']->exec_DELETEquery('sys_dmail_ttaddress_category_mm', 'uid_local=' . $conf['rec']['uid']);
if (is_array($newFieldsArr)) {
foreach (array_keys($newFieldsArr) as $uid) {
if (is_numeric($uid)) {
$count++;
$GLOBALS['TYPO3_DB']->exec_INSERTquery('sys_dmail_ttaddress_category_mm', array('uid_local' => intval($conf['rec']['uid']), 'uid_foreign' => intval($uid), 'sorting' => $count));
}
}
$GLOBALS['TYPO3_DB']->exec_UPDATEquery('tt_address', 'uid=' . intval($conf['rec']['uid']), array('module_sys_dmail_category' => $count));
}
/**
* IK: 27.04.09
* localized title in own field
*/
if (t3lib_div::inList('m,f', $conf['rec']['gender'])) {
$GLOBALS['TYPO3_DB']->exec_UPDATEquery('tt_address', 'uid=' . intval($conf['rec']['uid']), array('tx_directmailsubscription_localgender' => $this->pi_getLL('tt_addressGender' . strtoupper($conf['rec']['gender']))));
}
}
return;
}
示例3: createSitemap
/**
* Create Sitemap
* (either Index or page)
*
* @return string XML Sitemap
*/
protected function createSitemap()
{
$ret = '';
$page = t3lib_div::_GP('page');
$pageLimit = 10000;
// Page limit on sitemap (DEPRECATED)
$tmp = $this->getExtConf('sitemap_pageSitemapItemLimit', false);
if ($tmp !== false) {
$pageLimit = (int) $tmp;
}
if (isset($this->tsSetup['pageLimit']) && $this->tsSetup['pageLimit'] != '') {
$pageLimit = (int) $this->tsSetup['pageLimit'];
}
$pageItems = count($this->sitemapPages);
$pageItemBegin = $pageLimit * ($page - 1);
$pageCount = ceil($pageItems / $pageLimit);
if (empty($page) || $page == 'index') {
$ret = $this->createSitemapIndex($pageCount);
} elseif (is_numeric($page)) {
if ($pageItemBegin <= $pageItems) {
$this->sitemapPages = array_slice($this->sitemapPages, $pageItemBegin, $pageLimit);
$ret = $this->createSitemapPage($page);
}
}
return $ret;
}
示例4: queryTable
/**
* Queries a table for records and completely processes them
*
* Returns a two-dimensional array of almost finished records;
* they only need to be put into a <li>-structure
*
* @param array $params
* @param integer $recursionCounter recursion counter
* @return mixed array of rows or FALSE if nothing found
*/
public function queryTable(&$params, $recursionCounter = 0)
{
$uid = t3lib_div::_GP('uid');
$records = parent::queryTable($params, $recursionCounter);
if ($this->checkIfTagIsNotFound($records)) {
$text = htmlspecialchars($params['value']);
$javaScriptCode = '
var value=\'' . $text . '\';
Ext.Ajax.request({
url : \'ajax.php\' ,
params : { ajaxID : \'News::createTag\', item:value,newsid:\'' . $uid . '\' },
success: function ( result, request ) {
var arr = result.responseText.split(\'-\');
setFormValueFromBrowseWin(arr[5], arr[2] + \'_\' + arr[0], arr[1]);
TBE_EDITOR.fieldChanged(arr[3], arr[6], arr[4], arr[5]);
},
failure: function ( result, request) {
Ext.MessageBox.alert(\'Failed\', result.responseText);
}
});
';
$javaScriptCode = trim(str_replace('"', '\'', $javaScriptCode));
$link = implode(' ', explode(chr(10), $javaScriptCode));
$records['tx_news_domain_model_tag_' . strlen($text)] = array('text' => '<div onclick="' . $link . '">
<span class="suggest-path">
<a>' . sprintf($GLOBALS['LANG']->sL('LLL:EXT:news/Resources/Private/Language/locallang_be.xml:tag_suggest'), $text) . '</a>
</span></div>', 'table' => 'tx_news_domain_model_tag', 'class' => 'suggest-noresults', 'style' => 'background-color:#E9F1FE !important;background-image:url(' . $this->getDummyIconPath() . ');');
}
return $records;
}
示例5: extraGetJsProcessor
/**
* A hook to modifiy the js part of the extension,
* e.g. loading an extra custom layer
*
* @param string $js: the existing js
* @param array $$data: Array holding the config of the js
* @param obj $lconf: $this->config of the plugin
* @param obj $pobj: $this of the plugin
* @return the full js part, so you should know what you do!
*/
function extraGetJsProcessor($js, $data, $lConf, &$pObj) {
$postvar = t3lib_div::_GP('custom');
if ($postvar) {
$additionalJS = 'function CustomGetTileUrl(a,b) {
if (b==17 && a.x>=70461 && a.x<=70465 && a.y>=45785 && a.y<= 45790) {
return "http://p28123.typo3server.info/fileadmin/dev/map/tiles/Tile_"+(a.x)+"_"+(a.y)+"_"+b+".jpg";
} else if (b==16 && a.x>=35230 && a.x<=35232 && a.y>=22892 && a.y<= 22895) {
return "http://p28123.typo3server.info/fileadmin/dev/map/tiles/Tile_"+(a.x)+"_"+(a.y)+"_"+b+".jpg";
} else {
return G_NORMAL_MAP.getTileLayers()[0].getTileUrl(a,b);
}
}';
$additionalMap = 'var copyright = new GCopyright(1,new GLatLngBounds(new GLatLng(37.584580682182, 3.5339760780334), new GLatLng(57.584580682182, 23.533976078033)), 0, "Digitales Oberösterreichisches Raum-Informations-System");
var copyrightCollection = new GCopyrightCollection(\'Custom Layer\');
copyrightCollection.addCopyright(copyright);
var tilelayers = [new GTileLayer(copyrightCollection , 16, 17)];
tilelayers[0].getTileUrl = CustomGetTileUrl;
var custommap = new GMapType(tilelayers, G_SATELLITE_MAP.getProjection(), "Custom Layer", {errorMessage:"No chart data available"});
map.addMapType(custommap);';
$js = str_replace('//###MAKEMAP###',$additionalMap,$js);
}
$all = $js.$additionalJS;
return $all;
}
示例6: main
/**
* Processing of clickmenu items
*
* @param object Reference to parent
* @param array Menu items array to modify
* @param string Table name
* @param integer Uid of the record
* @return array Menu item array, returned after modification
* @todo Skinning for icons...
*/
function main(&$backRef, $menuItems, $table, $uid)
{
global $BE_USER, $TCA;
$localItems = array();
if ($backRef->cmLevel && t3lib_div::_GP('subname') == 'moreoptions' || $table === 'pages' && $uid == 0) {
// Show import/export on second level menu OR root level.
$LL = $this->includeLL();
$modUrl = $backRef->backPath . t3lib_extMgm::extRelPath('impexp') . 'app/index.php';
$url = $modUrl . '?tx_impexp[action]=export&id=' . ($table == 'pages' ? $uid : $backRef->rec['pid']);
if ($table == 'pages') {
$url .= '&tx_impexp[pagetree][id]=' . $uid;
$url .= '&tx_impexp[pagetree][levels]=0';
$url .= '&tx_impexp[pagetree][tables][]=_ALL';
} else {
$url .= '&tx_impexp[record][]=' . rawurlencode($table . ':' . $uid);
$url .= '&tx_impexp[external_ref][tables][]=_ALL';
}
$localItems[] = $backRef->linkItem($GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->getLLL('export', $LL)), $backRef->excludeIcon(t3lib_iconWorks::getSpriteIcon('actions-document-export-t3d')), $backRef->urlRefForCM($url), 1);
if ($table == 'pages') {
$url = $modUrl . '?id=' . $uid . '&table=' . $table . '&tx_impexp[action]=import';
$localItems[] = $backRef->linkItem($GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->getLLL('import', $LL)), $backRef->excludeIcon(t3lib_iconWorks::getSpriteIcon('actions-document-import-t3d')), $backRef->urlRefForCM($url), 1);
}
}
return array_merge($menuItems, $localItems);
}
示例7: getCurrentItem
/**
* Die dazu das aktuelle item für eine Detailseite zu holen bzw dieses zurückzusetzen.
* Dazu muss den Linker einfach folgendes für den action namen liefern: "show" + den eigentlichen key.
*
* Dann brauch man in der Detailansicht noch einen Button nach folgendem Schema:
* $markerArray['###NEWSEARCHBTN###'] = $formTool->createSubmit('showHowTo[clear]', '###LABEL_BUTTON_BACK###');
*
* @param string $key
* @param tx_rnbase_mod_IModule $module
*
* @return tx_rnbase_model_base
*/
public static function getCurrentItem($key, tx_rnbase_mod_IModule $module)
{
$itemid = 0;
$data = t3lib_div::_GP('show' . $key);
if ($data) {
list($itemid, ) = each($data);
}
$dataKey = 'current' . $key;
if ($itemid === 'clear') {
$data = t3lib_BEfunc::getModuleData(array($dataKey => ''), array($dataKey => '0'), $module->getName());
return false;
}
// Daten mit Modul abgleichen
$changed = $itemid ? array($dataKey => $itemid) : array();
$data = t3lib_BEfunc::getModuleData(array($dataKey => ''), $changed, $module->getName());
$itemid = $data[$dataKey];
if (!$itemid) {
return false;
}
$modelData = explode('|', $itemid);
$item = tx_rnbase::makeInstance($modelData[0], $modelData[1]);
if (!$item->isValid()) {
$item = null;
//auf null setzen damit die Suche wieder angezeigt wird
}
return $item;
}
示例8: init
function init()
{
global $BE_USER, $LANG, $BACK_PATH, $TCA_DESCR, $TCA, $CLIENT, $TYPO3_CONF_VARS;
if (t3lib_div::_GP('pageId') < 0 || t3lib_div::_GP('pageId') == '' || t3lib_div::_GP('templateId') < 0 || t3lib_div::_GP('templateId') == '' || t3lib_div::_GP('ISOcode') == '') {
die('if you want to us this mod you need at least to define pageId, templateId and ISOcode as GET parameter. Example path/to/TinyMCETemplate.php?pageId=7&templateId=2&ISOcode=en');
}
$this->pageId = t3lib_div::_GP('pageId');
$this->templateId = t3lib_div::_GP('templateId');
$this->ISOcode = t3lib_div::_GP('ISOcode');
$this->pageTSconfig = t3lib_BEfunc::getPagesTSconfig($this->pageId);
if (t3lib_div::_GP('mode') != 'FE') {
$this->conf = $this->pageTSconfig['RTE.']['default.'];
} else {
$this->conf = $this->pageTSconfig['RTE.']['default.']['FE.'];
}
$LANG->init(strtolower($this->ISOcode));
$this->tinymce_rte = t3lib_div::makeInstance('tx_tinymce_rte_base');
$this->conf = $this->tinymce_rte->init($this->conf);
$row = array('pid' => $this->pageId, 'ISOcode' => $this->ISOcode);
$this->conf = $this->tinymce_rte->fixTinyMCETemplates($this->conf, $row);
if (is_array($this->conf['TinyMCE_templates.'][$this->templateId]) && $this->conf['TinyMCE_templates.'][$this->templateId]['include'] != '') {
if (is_file($this->conf['TinyMCE_templates.'][$this->templateId]['include'])) {
include_once $this->conf['TinyMCE_templates.'][$this->templateId]['include'];
} else {
die('no file found at include path');
}
}
}
示例9: getCategoriesByForeignUid
/** **********************************************************************************************
* Get category by given uid ($_GP[tx_kiddognews_ajax]['uid'])
********************************************************************************************** */
public function getCategoriesByForeignUid()
{
// Workaround for the foreignUid
$node = t3lib_div::_GP('node');
if ($node == 'root') {
$this->tx_kiddognews_ajax['foreignUid'] = 1;
} else {
$this->tx_kiddognews_ajax['foreignUid'] = $node;
}
$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('name, uid', 'tx_kiddognews_domain_model_category', 'foreign_uid =' . $this->tx_kiddognews_ajax['foreignUid'], '', 'name', '');
$categories = '[';
while ($row = mysql_fetch_array($res)) {
$categories .= '{"text":"' . $row['name'] . '","id":"' . $row['uid'] . '","iconCls":"folder","draggable":false},';
}
$categories .= ']';
/**
* [
* {"text":"Data Sources","id":"datasources","iconCls":"folder","draggable":false},
* {"text":"Datasets","id":"datasets","iconCls":"folder","draggable":false},
* {"text":"Executive Reports","id":"execreports","iconCls":"folder","draggable":false},
* {"text":"Reports","id":"reports","iconCls":"folder","draggable":false}
* ]
*/
echo utf8_encode($categories);
}
示例10: main
/**
* Main function, returning the HTML content of the module
*
* @return string HTML
*/
function main()
{
$content = '';
$content .= '<p>Following functions modify the database which might be needed due to changed default behaviour of content elements.</p>';
$updateAction = t3lib_div::_GP('updateAction');
if ($updateAction === 'do_imagecaption_position_hidden') {
$updateContent = $this->perform_update_tt_content_imagecaption_position('hidden');
}
if ($updateAction === 'do_imagecaption_position_default') {
$updateContent = $this->perform_update_tt_content_imagecaption_position('default');
}
if ($updateContent) {
$content .= '<div class="bgColor5" style="margin:2em 0 1em 0; padding: 0.5em; border:1px solid #aaa">' . $updateContent . '</div>';
}
//
// captions
//
$onClickHidden = "document.location.href='" . t3lib_div::linkThisScript(array('updateAction' => 'do_imagecaption_position_hidden')) . "'; return false;";
$onClickVisible = "document.location.href='" . t3lib_div::linkThisScript(array('updateAction' => 'do_imagecaption_position_default')) . "'; return false;";
$content .= '<br /><h3>Image caption display</h3>
<p>When css_styled_content is used for rendering, this extension can change the rendering so captions can be fetched from DAM for the content elements Image and Text w/image (see extension options).</p>
<p>Captions might be visible now (coming from DAM) where no captions were needed. With the following functions...</p>
<ul>
<li>all unused captions can be set hidden</li>
<li>all hidden captions can be set visible again</li>
</ul>
<input onclick="' . htmlspecialchars($onClickHidden) . '" type="submit" value="Set unused captions hidden"> ' . '<input onclick="' . htmlspecialchars($onClickVisible) . '" type="submit" value="unhide captions"></form>
';
return $content;
}
示例11: main
/**
* Main function, returning the HTML content of the module
*
* @return string HTML
*/
function main() {
require_once(t3lib_extMgm::extPath(STATIC_INFO_TABLES_EXTkey).'class.tx_staticinfotables_encoding.php');
$tableArray = array ('static_countries', 'static_country_zones', 'static_languages', 'static_currencies');
$content = '';
$content.= '<br />Convert character encoding of the static info tables.';
$content.= '<br />The default encoding is UTF-8.';
$destEncoding = htmlspecialchars(t3lib_div::_GP('dest_encoding'));
if(t3lib_div::_GP('convert') AND ($destEncoding != '')) {
foreach ($tableArray as $table) {
$content .= '<p>'.htmlspecialchars($table.' > '.$destEncoding).'</p>';
tx_staticinfotables_encoding::convertEncodingTable($table, 'utf-8', $destEncoding);
}
$content .= '<p>You must enter the charset \''.$destEncoding.'\' now manually in the EM for static_info_tables!</p>';
$content .= '<p>Done</p>';
} else {
$content .= '<form name="static_info_tables_form" action="'.htmlspecialchars(t3lib_div::linkThisScript()).'" method="post">';
$linkScript = t3lib_div::slashJS(t3lib_div::linkThisScript());
$content .= '<br /><br />';
$content .= 'This conversion works only once. When you converted the tables and you want to do it again to another encoding you have to reinstall the tables with the Extension Manager or select \'UPDATE!\'.';
$content .= '<br /><br />';
$content .= 'Destination character encoding:';
$content .= '<br />'.tx_staticinfotables_encoding::getEncodingSelect('dest_encoding', '', '', $TYPO3_CONF_VARS['EXTCONF'][STATIC_INFO_TABLES_EXTkey]['charset']);
$content .= '<br /><br />';
$content .= '<input type="submit" name="convert" value="Convert" onclick="this.form.action=\''.$linkScript.'\';submit();" />';
$content .= '</form>';
}
return $content;
}
示例12: main
/**
* Main function, returning the HTML content of the module
*
* @return string HTML
*/
function main()
{
$content = '';
$content .= '<br />Update the Static Info Tables with new language labels.';
$content .= '<br />';
if (t3lib_div::_GP('import')) {
$destEncoding = t3lib_div::_GP('dest_encoding');
$extPath = t3lib_extMgm::extPath('static_info_tables_it');
$fileContent = explode("\n", t3lib_div::getUrl($extPath . 'ext_tables_static_update.sql'));
foreach ($fileContent as $line) {
if ($line = trim($line) and preg_match('#^UPDATE#i', $line)) {
$query = $this->getUpdateEncoded($line, $destEncoding);
$res = $GLOBALS['TYPO3_DB']->admin_query($query);
}
}
$content .= '<br />';
$content .= '<p>Encoding: ' . htmlspecialchars($destEncoding) . '</p>';
$content .= '<p>Done.</p>';
} elseif (t3lib_extMgm::isLoaded('static_info_tables_it')) {
$content .= '</form>';
$content .= '<form action="' . htmlspecialchars(t3lib_div::linkThisScript()) . '" method="post">';
$content .= '<br />Destination character encoding:';
$content .= '<br />' . tx_staticinfotables_encoding::getEncodingSelect('dest_encoding', '', 'utf-8');
$content .= '<br />(The character encoding must match the encoding of the existing tables data. By default this is UTF-8.)';
$content .= '<br /><br />';
$content .= '<input type="submit" name="import" value="Import" />';
$content .= '</form>';
} else {
$content .= '<br /><strong>The extension needs to be installed first!</strong>';
}
return $content;
}
示例13: PM_MainContentAfterHook
/**
* Don't show powermail form if session is empty
*
* @param string $content: html content from powermail
* @param array $piVars: piVars from powermail
* @param object $pObj: piVars from powermail
* @return void
*/
public function PM_MainContentAfterHook($content, $piVars, &$pObj)
{
$conf = $GLOBALS['TSFE']->tmpl->setup['plugin.']['tx_wtcart_pi1.'];
$piVars = t3lib_div::_GP('tx_powermail_pi1');
if ($piVars['mailID'] > 0 || $piVars['sendNow'] > 0) {
return false;
// stop
}
if ($conf['powermailContent.']['uid'] > 0 && intval($conf['powermailContent.']['uid']) == $pObj->cObj->data['uid']) {
// if powermail uid isset and fits to current CE
$div = t3lib_div::makeInstance('tx_wtcart_div');
// Create new instance for div functions
$products = $div->getProductsFromSession();
// get products from session
if (!is_array($products) || count($products) == 0) {
// if there are no products in the session
$pObj->content = '';
// clear content
}
$sesArray = $GLOBALS['TSFE']->fe_user->getKey('ses', 'wt_cart_cart_' . $GLOBALS["TSFE"]->id);
$cartmin = $GLOBALS['TSFE']->tmpl->setup['plugin.']['tx_wtcart_pi1.']['cart.']['cartmin.'];
if (floatval($sesArray['cart_gross_no_service']) < floatval($cartmin['value']) && $cartmin['hideifnotreached.']['powermail']) {
$pObj->content = '';
// clear content
}
}
}
示例14: render
/**
* Render javascript in header
*
* @return string the rendered page info icon
* @see template::getPageInfo() Note: can't call this method as it's protected!
*/
public function render()
{
$doc = $this->getDocInstance();
$id = t3lib_div::_GP('id');
$pageRecord = t3lib_BEfunc::readPageAccess($id, $GLOBALS['BE_USER']->getPagePermsClause(1));
// Add icon with clickmenu, etc:
if ($pageRecord['uid']) {
// If there IS a real page
$alttext = t3lib_BEfunc::getRecordIconAltText($pageRecord, 'pages');
$iconImg = t3lib_iconWorks::getSpriteIconForRecord('pages', $pageRecord, array('title' => htmlspecialchars($alttext)));
// Make Icon:
$theIcon = $GLOBALS['SOBE']->doc->wrapClickMenuOnIcon($iconImg, 'pages', $pageRecord['uid']);
} else {
// On root-level of page tree
// Make Icon
$iconImg = '<img' . t3lib_iconWorks::skinImg($this->backPath, 'gfx/i/_icon_website.gif') . ' alt="' . htmlspecialchars($GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename']) . '" />';
if ($BE_USER->user['admin']) {
$theIcon = $GLOBALS['SOBE']->doc->wrapClickMenuOnIcon($iconImg, 'pages', 0);
} else {
$theIcon = $iconImg;
}
}
// Setting icon with clickmenu + uid
$pageInfo = $theIcon . '<em>[pid: ' . $pageRecord['uid'] . ']</em>';
return $pageInfo;
}
示例15: init
/**
* Initializes the clipboard object. The calling class must make sure that the right locallang files are already loaded.
* This method is usually called by the templavoila page module.
*
* Also takes the GET variable "CB" and submits it to the t3lib clipboard class which handles all
* the incoming information and stores it in the user session.
*
* @param $pObj: Reference to the parent object ($this)
* @return void
* @access public
*/
function init(&$pObj) {
global $LANG, $BACK_PATH;
// Make local reference to some important variables:
$this->pObj =& $pObj;
$this->doc =& $this->pObj->doc;
$this->extKey =& $this->pObj->extKey;
$this->MOD_SETTINGS =& $this->pObj->MOD_SETTINGS;
// Initialize the t3lib clipboard:
$this->t3libClipboardObj = t3lib_div::makeInstance('t3lib_clipboard');
$this->t3libClipboardObj->backPath = $BACK_PATH;
$this->t3libClipboardObj->initializeClipboard();
$this->t3libClipboardObj->lockToNormal();
// Clipboard actions are handled:
$CB = t3lib_div::_GP('CB'); // CB is the clipboard command array
$this->t3libClipboardObj->setCmd($CB); // Execute commands.
if (isset ($CB['setFlexMode'])) {
switch ($CB['setFlexMode']) {
case 'copy' : $this->t3libClipboardObj->clipData['normal']['flexMode'] = 'copy'; break;
case 'cut': $this->t3libClipboardObj->clipData['normal']['flexMode'] = 'cut'; break;
case 'ref': $this->t3libClipboardObj->clipData['normal']['flexMode'] = 'ref'; break;
default: unset ($this->t3libClipboardObj->clipData['normal']['flexMode']); break;
}
}
$this->t3libClipboardObj->cleanCurrent(); // Clean up pad
$this->t3libClipboardObj->endClipboard(); // Save the clipboard content
// Add a list of non-used elements to the sidebar:
$this->pObj->sideBarObj->addItem('nonUsedElements', $this, 'sidebar_renderNonUsedElements', $LANG->getLL('nonusedelements'),30);
}