本文整理汇总了PHP中t3lib_div::callUserFunction方法的典型用法代码示例。如果您正苦于以下问题:PHP t3lib_div::callUserFunction方法的具体用法?PHP t3lib_div::callUserFunction怎么用?PHP t3lib_div::callUserFunction使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类t3lib_div
的用法示例。
在下文中一共展示了t3lib_div::callUserFunction方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: render_wizard
/**
* Renders the form in the kickstarter; this was add_cat_modulefunction()
*
* @return HTML
*/
function render_wizard()
{
$lines = array();
$action = explode(':', $this->wizard->modData['wizAction']);
if ($action[0] == 'edit') {
$this->regNewEntry($this->sectionID, $action[1]);
$lines = $this->catHeaderLines($lines, $this->sectionID, $this->wizard->options[$this->sectionID], ' ', $action[1]);
$piConf = $this->wizard->wizArray[$this->sectionID][$action[1]];
$ffPrefix = '[' . $this->sectionID . '][' . $action[1] . ']';
// Enter title of the module function
$subContent = '<strong>Enter the title of function-menu item:</strong><br />' . $this->renderStringBox_lang('title', $ffPrefix, $piConf);
$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';
// Position
$optValues = array('web_func' => 'Web>Func', 'web_func_wizards' => 'Web>Func, Wizards', 'web_info' => 'Web>Info', 'web_ts' => 'Web>Template', 'user_task' => 'User>Task Center');
$subContent = '<strong>Sub- or main module?</strong><br />' . $this->renderSelectBox($ffPrefix . '[position]', $piConf['position'], $optValues) . '<br /><br />These images gives you an idea what the options above means:' . $this->resImg('modulefunc_task.png') . $this->resImg('modulefunc_func.png');
$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';
}
/* HOOK: Place a hook here, so additional output can be integrated */
if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['kickstarter']['add_cat_moduleFunction'])) {
foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['kickstarter']['add_cat_moduleFunction'] as $_funcRef) {
$lines = t3lib_div::callUserFunction($_funcRef, $lines, $this);
}
}
$content = '<table border="0" cellpadding="2" cellspacing="2">' . implode('', $lines) . '</table>';
return $content;
}
开发者ID:rafu1987,项目名称:t3bootstrap-project,代码行数:31,代码来源:class.tx_kickstarter_section_modulefunction.php
示例2: render_wizard
/**
* Renders the form in the kickstarter; this was add_cat_languages()
*
* @return HTML
*/
function render_wizard()
{
$lines = array();
$action = explode(':', $this->wizard->modData['wizAction']);
if ($action[0] == 'edit') {
$action[1] = 1;
$this->regNewEntry($this->sectionID, $action[1]);
$lines = $this->catHeaderLines($lines, $this->sectionID, $this->wizard->options[$this->sectionID], ' ', $action[1]);
$piConf = $this->wizard->wizArray[$this->sectionID][$action[1]];
$ffPrefix = '[' . $this->sectionID . '][' . $action[1] . ']';
$subContent = '';
reset($this->wizard->languages);
while (list($k, $v) = each($this->wizard->languages)) {
$key = $ffPrefix . '[' . $k . ']';
$subContent .= $this->renderCheckBox($key, $piConf[$k]) . '<label for="field_' . md5($key) . '">' . $v . '</label><br />';
}
$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($this->textSetup('Select which languages to setup:', $subContent)) . '</td></tr>';
}
/* HOOK: Place a hook here, so additional output can be integrated */
if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['kickstarter']['add_cat_languages'])) {
foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['kickstarter']['add_cat_languages'] as $_funcRef) {
$lines = t3lib_div::callUserFunction($_funcRef, $lines, $this);
}
}
$content = '<table border="0" cellpadding="2" cellspacing="2">' . implode('', $lines) . '</table>';
return $content;
}
示例3: render_wizard
/**
* Renders the form in the kickstarter; this was add_cat_()
*
* @return string ...
*/
function render_wizard()
{
$lines = array();
$action = explode(':', $this->wizard->modData['wizAction']);
if ($action[0] == 'edit') {
$action[1] = 1;
$this->regNewEntry($this->sectionID, $action[1]);
$lines = $this->catHeaderLines($lines, $this->sectionID, $this->wizard->options[$this->sectionID], ' ', $action[1]);
$piConf = $this->wizard->wizArray[$this->sectionID][$action[1]];
$ffPrefix = '[' . $this->sectionID . '][' . $action[1] . ']';
// Enter Page TSconfige
$subContent = '<strong>Default Page TSconfig:</strong><br />' . $this->renderTextareaBox($ffPrefix . '[page_TSconfig]', $piConf['page_TSconfig']);
$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';
// Enter User TSconfig
$subContent = '<strong>Default User TSconfig:</strong><br />' . $this->renderTextareaBox($ffPrefix . '[user_TSconfig]', $piConf['user_TSconfig']);
$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';
}
/* HOOK: Place a hook here, so additional output can be integrated */
if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['kickstarter']['add_cat_tsconfig'])) {
foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['kickstarter']['add_cat_tsconfig'] as $_funcRef) {
$lines = t3lib_div::callUserFunction($_funcRef, $lines, $this);
}
}
$content = '<table border="0" cellpadding="2" cellspacing="2">' . implode('', $lines) . '</table>';
return $content;
}
示例4: render_wizard
/**
* Renders the form in the kickstarter
*
* @return string wizard
*/
function render_wizard()
{
$lines = array();
$action = explode(':', $this->wizard->modData['wizAction']);
if ($action[0] == 'edit') {
$this->regNewEntry($this->sectionID, $action[1]);
$lines = $this->catHeaderLines($lines, $this->sectionID, $this->wizard->options[$this->sectionID], ' ', $action[1]);
$piConf = $this->wizard->wizArray[$this->sectionID][$action[1]];
$ffPrefix = '[' . $this->sectionID . '][' . $action[1] . ']';
// Enter title of the static extension template
$subContent = '<strong>Enter a title for the static extension template:</strong><br />' . $this->renderStringBox($ffPrefix . '[title]', $piConf['title']);
$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';
// Enter constants
$subContent = '<strong>Constants:</strong><br />' . $this->renderTextareaBox($ffPrefix . '[constants]', $piConf['constants']);
$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';
// Enter setup
$subContent = '<strong>Setup:</strong><br />' . $this->renderTextareaBox($ffPrefix . '[setup]', $piConf['setup']);
$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';
}
/* HOOK: Place a hook here, so additional output can be integrated */
if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['kickstarter']['add_cat_ts'])) {
foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['kickstarter']['add_cat_ts'] as $_funcRef) {
$lines = t3lib_div::callUserFunction($_funcRef, $lines, $this);
}
}
$content = '<table border="0" cellpadding="2" cellspacing="2">' . implode('', $lines) . '</table>';
return $content;
}
示例5: callHookObjects
/**
* Function to call hooks from any extension
*
* @param string $extKey: Unique extension key
* @param string $theHook: Name of hook
* @param mixed $parameter: Parameter to assign to function
* @param mixed $ref: Reference to calling object
* @return void
*
*/
public static function callHookObjects($extKey, $theHook, &$parameter, &$ref)
{
if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$extKey][$theHook])) {
foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$extKey][$theHook] as $funcRef) {
t3lib_div::callUserFunction($funcRef, $parameter, $ref);
}
}
}
示例6: foreach
/**
* processes certain hooks for each section
*
* @param string hook name
* @param array the data to proces by the hook
* @return array the processed data
*/
function &process_hook($hookName, &$data)
{
if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['kickstarter'][$this->sectionID][$hookName])) {
foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['kickstarter'][$this->sectionID][$hookName] as $_funcRef) {
$data =& t3lib_div::callUserFunction($_funcRef, $data, $this);
}
}
return $data;
}
示例7: routeAction
/**
* Routes the given eID action to the related ExtDirect method with the necessary
* ajax object.
*
* @return void
*/
public function routeAction()
{
tslib_eidtools::initLanguage();
tslib_eidtools::connectDB();
$ajaxID = t3lib_div::_GP('action');
$ajaxScript = $GLOBALS['TYPO3_CONF_VARS']['BE']['AJAX']['ExtDirect::' . $ajaxID];
$this->ajaxObject = t3lib_div::makeInstance('TYPO3AJAX', 'ExtDirect::' . $ajaxID);
$parameters = array();
t3lib_div::callUserFunction($ajaxScript, $parameters, $this->ajaxObject, FALSE, TRUE);
}
示例8: processOutput
function processOutput()
{
if ($GLOBALS['TSFE']->type != $GLOBALS['pdf_generator2_parameters']['typeNum']) {
parent::processOutput();
} else {
$_params = array('pObj' => &$this);
require_once t3lib_div::getFileAbsFileName('EXT:pdf_generator2/class.tx_pdfgenerator2.php');
t3lib_div::callUserFunction("tx_pdfgenerator2->tslib_fe_processOutput", $_params, $this);
}
}
示例9: render_wizard
/**
* Renders the form in the kickstarter; this was add_cat_()
*
* @return string wizard
*/
function render_wizard()
{
$lines = array();
$action = explode(':', $this->wizard->modData['wizAction']);
if ($action[0] == 'edit') {
$this->regNewEntry($this->sectionID, $action[1]);
$lines = $this->catHeaderLines($lines, $this->sectionID, $this->wizard->options[$this->sectionID], '<strong>Edit Service #' . $action[1] . '</strong>', $action[1]);
$piConf = $this->wizard->wizArray[$this->sectionID][$action[1]];
$ffPrefix = '[' . $this->sectionID . '][' . $action[1] . ']';
if (!$this->wizard->EMmode && $this->wizard->saveKey) {
$extKeyRec = $this->wizard->pObj->getExtKeyRecord($this->saveKey);
}
// Title
$subContent = '<strong>Title:</strong><br />' . $this->renderStringBox($ffPrefix . '[title]', $piConf['title'] ? $piConf['title'] : $extKeyRec['title']);
$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';
// Description
$subContent = '<strong>Description:</strong><br />' . $this->renderStringBox($ffPrefix . '[description]', $piConf['description'] ? $piConf['description'] : $extKeyRec['description']);
$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';
$lines[] = '<tr><td> </td><td></td></tr>';
// Type
$subContent = '<strong>Service type:</strong><br />' . $this->renderStringBox($ffPrefix . '[type]', $piConf['type'] ? $piConf['type'] : $extKeyRec['type']) . '<br />' . 'Enter here the key to define which type of service this should be.<br />Examples: "textExtract", "metaExtract".';
$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';
// SubType
$subContent = '<strong>Sub type(s) (comma list):</strong><br />' . $this->renderStringBox($ffPrefix . '[subtype]', $piConf['subtype'] ? $piConf['subtype'] : $extKeyRec['subtype']) . '<br />' . 'Possible subtypes are defined by the service type.<br />You have read the service type documentation.<br />Example: using subtypes for file types (doc, txt, pdf, ...) the service might work for.';
$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';
$lines[] = '<tr><td> </td><td></td></tr>';
// Priority
$optValues = array('50' => 'default (50)', '10' => 'very low (10)', '20' => 'low (20)', '40' => 'bit lower (40)', '60' => 'bit higher (60)', '80' => 'high (80)', '100' => 'Very high (100)');
$subContent = '<strong>Priority:</strong><br />' . $this->renderSelectBox($ffPrefix . '[priority]', $piConf['priority'], $optValues) . '<br />' . '50 = medium priority. <br />The priority of services can be changed by admin configuration.';
$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';
// Quality
$quality = $piConf['quality'] ? $piConf['quality'] : $extKeyRec['quality'];
$quality = $quality ? $quality : '50';
$subContent = '<strong>Quality:</strong><br />' . $this->renderStringBox($ffPrefix . '[quality]', $quality) . '<br />' . 'The numbering of the quality is defined by the service type.<br />You have read the service type documentation.<br />The default quality range is 0-100.';
$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';
// OS Dependencies
$optValues = array('' => 'no special dependency', 'unix' => 'Unix only', 'win' => 'Windows only');
$lines[] = '<tr><td> </td><td></td></tr>';
$subContent = '<strong>Operating System dependency:</strong><br />' . $this->renderSelectBox($ffPrefix . '[os]', $piConf['os'], $optValues);
$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';
// Exec dependencies
$subContent = '<strong>External program(s) (comma list):</strong><br />' . $this->renderStringBox($ffPrefix . '[exec]', $piConf['exec']) . '<br />' . 'Program(s) needed to run this service (eg. "perl").';
$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';
}
/* HOOK: Place a hook here, so additional output can be integrated */
if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['kickstarter']['add_cat_services'])) {
foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['kickstarter']['add_cat_services'] as $_funcRef) {
$lines = t3lib_div::callUserFunction($_funcRef, $lines, $this);
}
}
$content = '<table border="0" cellpadding="2" cellspacing="2">' . implode('', $lines) . '</table>';
return $content;
}
示例10: render_wizard
/**
* Renders the form in the kickstarter; this was add_cat_fields()
*
* @return string HTML code
*/
function render_wizard()
{
$lines = array();
$action = explode(':', $this->wizard->modData['wizAction']);
if ($action[0] == 'edit') {
$this->regNewEntry($this->sectionID, $action[1]);
$lines = $this->catHeaderLines($lines, $this->sectionID, $this->wizard->options[$this->sectionID], ' ', $action[1]);
$piConf = $this->wizard->wizArray[$this->sectionID][$action[1]];
$ffPrefix = '[' . $this->sectionID . '][' . $action[1] . ']';
}
// Header field
$optValues = array('tt_content' => 'tt_content (Content)', 'fe_users' => 'fe_users (Frontend Users)', 'fe_groups' => 'fe_groups (Frontend Groups)', 'be_users' => 'be_users (Backend Users)', 'be_groups' => 'be_groups (Backend Groups)', 'pages' => 'pages (Pages)');
foreach ($GLOBALS['TCA'] as $tablename => $tableTCA) {
if (!$optValues[$tablename]) {
$optValues[$tablename] = $tablename . ' (' . $GLOBALS['LANG']->sL($tableTCA['ctrl']['title']) . ')';
}
}
asort($optValues);
$subContent = '<strong>Which table:<br /></strong>' . $this->renderSelectBox($ffPrefix . '[which_table]', $piConf['which_table'], $optValues) . $this->whatIsThis('Select the table which should be extended with these extra fields.');
$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '<input type="hidden" name="' . $this->piFieldName('wizArray_upd') . $ffPrefix . '[title]" value="' . ($piConf['which_table'] ? $optValues[$piConf['which_table']] : '') . '" /></td></tr>';
// PRESETS:
$selPresetBox = $this->presetBox($piConf['fields']);
// Fields
$c = array(0);
$this->usedNames = array();
if (is_array($piConf['fields'])) {
$piConf['fields'] = $this->cleanFieldsAndDoCommands($piConf['fields'], $this->sectionID, $action[1], $piConf['which_table'] ? $piConf['which_table'] : '');
// Do it for real...
reset($piConf['fields']);
while (list($k, $v) = each($piConf['fields'])) {
$c[] = $k;
$subContent = $this->renderField($ffPrefix . '[fields][' . $k . ']', $v);
$lines[] = '<tr' . $this->bgCol(2) . '><td>' . $this->fw('<strong>FIELD:</strong> <em>' . $v['fieldname'] . '</em>') . '</td></tr>';
$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';
}
}
// New field:
$k = max($c) + 1;
$v = array();
$lines[] = '<tr' . $this->bgCol(2) . '><td>' . $this->fw('<strong>NEW FIELD:</strong>') . '</td></tr>';
$subContent = $this->renderField($ffPrefix . '[fields][' . $k . ']', $v, 1);
$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';
$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw('<br /><br />Load preset fields: <br />' . $selPresetBox) . '</td></tr>';
/* HOOK: Place a hook here, so additional output can be integrated */
if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['kickstarter']['add_cat_fields'])) {
foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['kickstarter']['add_cat_fields'] as $_funcRef) {
$lines = t3lib_div::callUserFunction($_funcRef, $lines, $this);
}
}
$content = '<table border="0" cellpadding="2" cellspacing="2">' . implode('', $lines) . '</table>';
return $content;
}
示例11: mail
/**
* Proxy for the PHP mail() function. Adds possibility to hook in and send the mails in a different way.
* The hook can be used by adding function to the configuration array:
* $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/utility/class.t3lib_utility_mail.php']['substituteMailDelivery']
*
* @param string Email address to send to.
* @param string Subject line, non-encoded. (see PHP function mail())
* @param string Message content, non-encoded. (see PHP function mail())
* @param string Additional headers for the mail (see PHP function mail())
* @param string Additional flags for the sending mail tool (see PHP function mail())
* @return boolean Indicates whether the mail has been sent or not
* @see PHP function mail() []
* @link http://www.php.net/manual/en/function.mail.php
*/
public static function mail($to, $subject, $messageBody, $additionalHeaders = NULL, $additionalParameters = NULL)
{
$success = TRUE;
// If the mail does not have a From: header, fall back to the default in TYPO3_CONF_VARS.
if (!preg_match('/^From:/im', $additionalHeaders) && $GLOBALS['TYPO3_CONF_VARS']['MAIL']['defaultMailFromAddress']) {
if (!is_null($additionalHeaders) && substr($additionalHeaders, -1) != LF) {
$additionalHeaders .= LF;
}
if ($GLOBALS['TYPO3_CONF_VARS']['MAIL']['defaultMailFromName']) {
$additionalHeaders .= 'From: "' . $GLOBALS['TYPO3_CONF_VARS']['MAIL']['defaultMailFromName'] . '" <' . $GLOBALS['TYPO3_CONF_VARS']['MAIL']['defaultMailFromAddress'] . '>';
} else {
$additionalHeaders .= 'From: ' . $GLOBALS['TYPO3_CONF_VARS']['MAIL']['defaultMailFromAddress'];
}
}
if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/utility/class.t3lib_utility_mail.php']['substituteMailDelivery'])) {
$parameters = array('to' => $to, 'subject' => $subject, 'messageBody' => $messageBody, 'additionalHeaders' => $additionalHeaders, 'additionalParameters' => $additionalParameters);
$fakeThis = FALSE;
foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/utility/class.t3lib_utility_mail.php']['substituteMailDelivery'] as $hookSubscriber) {
$hookSubscriberContainsArrow = strpos($hookSubscriber, '->');
if ($hookSubscriberContainsArrow !== FALSE) {
// deprecated, remove in TYPO3 4.7
t3lib_div::deprecationLog('The usage of user function notation for the substituteMailDelivery hook is deprecated,
use the t3lib_mail_MailerAdapter interface instead.');
$success = $success && t3lib_div::callUserFunction($hookSubscriber, $parameters, $fakeThis);
} else {
$mailerAdapter = t3lib_div::makeInstance($hookSubscriber);
if ($mailerAdapter instanceof t3lib_mail_MailerAdapter) {
$success = $success && $mailerAdapter->mail($to, $subject, $messageBody, $additionalHeaders, $additionalParameters, $fakeThis);
} else {
throw new RuntimeException($hookSubscriber . ' is not an implementation of t3lib_mail_MailerAdapter,
but must implement that interface to be used in the substituteMailDelivery hook.', 1294062286);
}
}
}
} else {
if (t3lib_utility_PhpOptions::isSafeModeEnabled() && !is_null($additionalParameters)) {
$additionalParameters = null;
}
if (is_null($additionalParameters)) {
$success = @mail($to, $subject, $messageBody, $additionalHeaders);
} else {
$success = @mail($to, $subject, $messageBody, $additionalHeaders, $additionalParameters);
}
}
if (!$success) {
t3lib_div::sysLog('Mail to "' . $to . '" could not be sent (Subject: "' . $subject . '").', 'Core', 3);
}
return $success;
}
示例12: getExtraInfo
/**
*
* @param array $row
* @return string
*/
protected function getExtraInfo($row)
{
if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['list_type_Info'][$row['list_type']])) {
$hookArr = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['list_type_Info'][$row['list_type']];
} elseif (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['list_type_Info']['_DEFAULT'])) {
$hookArr = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['list_type_Info']['_DEFAULT'];
}
$extraInfo = '';
if (count($hookArr) > 0) {
$_params = array('pObj' => &$this, 'row' => $row, 'infoArr' => $infoArr);
foreach ($hookArr as $_funcRef) {
$extraInfo .= t3lib_div::callUserFunction($_funcRef, $_params, $this);
}
}
return $extraInfo ? $extraInfo : '';
}
示例13: settingLanguage
/**
* Setting the language key that'll be used by the current page.
* In this function it should be checked, 1) that this language exists, 2) that a page_overlay_record exists, .. and if not the default language, 0 (zero), should be set.
*
* @return void
* @access private
*/
function settingLanguage()
{
if (is_array($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['settingLanguage_preProcess'])) {
$_params = array();
foreach ($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['settingLanguage_preProcess'] as $_funcRef) {
t3lib_div::callUserFunction($_funcRef, $_params, $this);
}
}
parent::settingLanguage();
if (is_array($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['settingLanguage_postProcess'])) {
$_params = array();
foreach ($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['settingLanguage_postProcess'] as $_funcRef) {
t3lib_div::callUserFunction($_funcRef, $_params, $this);
}
}
}
示例14: render_wizard
/**
* Renders the form in the kickstarter; this was add_cat_emconf()
*
* @return [type] ...
*/
function render_wizard()
{
$lines = array();
$action = explode(':', $this->wizard->modData['wizAction']);
if ($action[0] == 'edit') {
$action[1] = 1;
$this->regNewEntry($this->sectionID, $action[1]);
$lines = $this->catHeaderLines($lines, $this->sectionID, $this->wizard->options[$this->sectionID], ' ', $action[1]);
$piConf = $this->wizard->wizArray[$this->sectionID][$action[1]];
$ffPrefix = '[' . $this->sectionID . '][' . $action[1] . ']';
if (!$this->wizard->EMmode && $this->wizard->saveKey) {
$extKeyRec = $this->wizard->pObj->getExtKeyRecord($this->wizard->saveKey);
}
// Title
$subContent = '<strong>Title:</strong><br />' . $this->renderStringBox($ffPrefix . '[title]', $piConf['title'] ? $piConf['title'] : $extKeyRec['title']);
$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';
// Description
$subContent = '<strong>Description:</strong><br />' . $this->renderTextareaBox($ffPrefix . '[description]', $piConf['description'] ? $piConf['description'] : $extKeyRec['description']);
$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';
// Sub-position
$optValues = array('' => '', 'fe' => 'Frontend', 'plugin' => 'Frontend Plugins', 'be' => 'Backend', 'module' => 'Backend Modules', 'services' => 'Services', 'example' => 'Examples', 'misc' => 'Miscellaneous', 'templates' => 'Templates', 'doc' => 'Documentation');
$subContent = '<strong>Category:</strong><br />' . $this->renderSelectBox($ffPrefix . '[category]', $piConf['category'], $optValues);
$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';
// State
$optValues = array('alpha' => 'Alpha (Very initial development)', 'beta' => 'Beta (Under current development, should work partly)', 'stable' => 'Stable (Stable and used in production)', 'experimental' => 'Experimental (Nobody knows if this is going anywhere yet...)', 'test' => 'Test (Test extension, demonstrates concepts etc.)');
$subContent = '<strong>State</strong><br />' . $this->renderSelectBox($ffPrefix . '[state]', $piConf['state'], $optValues);
$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';
// Dependencies
$subContent = '<strong>Dependencies (comma list of extkeys):</strong><br />' . $this->renderStringBox($ffPrefix . '[dependencies]', $piConf['dependencies']);
$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';
// Author
$subContent = '<strong>Author Name:</strong><br />' . $this->renderStringBox($ffPrefix . '[author]', $piConf['author'] ? $piConf['author'] : $GLOBALS['BE_USER']->user['realName']);
$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';
// Author/Email
$subContent = '<strong>Author email:</strong><br />' . $this->renderStringBox($ffPrefix . '[author_email]', $piConf['author_email'] ? $piConf['author_email'] : $GLOBALS['BE_USER']->user['email']);
$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';
}
/* HOOK: Place a hook here, so additional output can be integrated */
if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['kickstarter']['add_cat_emconf'])) {
foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['kickstarter']['add_cat_emconf'] as $_funcRef) {
$lines = t3lib_div::callUserFunction($_funcRef, $lines, $this);
}
}
$content = '<table border="0" cellpadding="2" cellspacing="2">' . implode('', $lines) . '</table>';
return $content;
}
示例15: mail
/**
* Proxy for the PHP mail() function. Adds possibility to hook in and send the mails in a different way.
* The hook can be used by adding function to the configuration array:
* $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/utility/class.t3lib_utility_mail.php']['substituteMailDelivery']
*
* @param string Email address to send to.
* @param string Subject line, non-encoded. (see PHP function mail())
* @param string Message content, non-encoded. (see PHP function mail())
* @param string Additional headers for the mail (see PHP function mail())
* @param string Additional flags for the sending mail tool (see PHP function mail())
* @return boolean Indicates whether the mail has been sent or not
* @see PHP function mail() []
* @link http://www.php.net/manual/en/function.mail.php
*/
public static function mail($to, $subject, $messageBody, $additionalHeaders = null, $additionalParameters = null)
{
$success = TRUE;
if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/utility/class.t3lib_utility_mail.php']['substituteMailDelivery'])) {
$parameters = array('to' => $to, 'subject' => $subject, 'messageBody' => $messageBody, 'additionalHeaders' => $additionalHeaders, 'additionalParameters' => $additionalParameters);
$fakeThis = FALSE;
foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/utility/class.t3lib_utility_mail.php']['substituteMailDelivery'] as $hookMethod) {
$success = $success && t3lib_div::callUserFunction($hookMethod, $parameters, $fakeThis);
}
} else {
$success = @mail($to, $subject, $messageBody, $additionalHeaders, $additionalParameters);
}
if (!$success) {
t3lib_div::sysLog('Mail to "' . $email . '" could not be sent (Subject: "' . $subject . '").', 'Core', 3);
}
return $success;
}