本文整理汇总了PHP中FluidTYPO3\Flux\Form::getName方法的典型用法代码示例。如果您正苦于以下问题:PHP Form::getName方法的具体用法?PHP Form::getName怎么用?PHP Form::getName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FluidTYPO3\Flux\Form
的用法示例。
在下文中一共展示了Form::getName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: registerFormForTable
/**
* @param string $table
* @param Form $form
* @return void
*/
public static function registerFormForTable($table, Form $form)
{
if (NULL === $form->getName()) {
$form->setName($table);
}
if (NULL === $form->getExtensionName() && TRUE === isset($GLOBALS['_EXTKEY'])) {
$form->setExtensionName(GeneralUtility::underscoredToUpperCamelCase($GLOBALS['_EXTKEY']));
}
self::$forms['tables'][$table] = $form;
}
示例2: registerModuleBasedOnFluxForm
/**
* @param string $qualifiedExtensionName
* @param Form $form
* @return void
* @throws \RuntimeException
*/
public function registerModuleBasedOnFluxForm($qualifiedExtensionName, Form $form)
{
$extensionKey = ExtensionNamingUtility::getExtensionKey($qualifiedExtensionName);
$signature = ExtensionNamingUtility::getExtensionSignature($qualifiedExtensionName);
$options = $form->getOption('Fluidbackend');
$formId = $form->getName();
$module = 'web';
if (TRUE === isset($options[Constants::FORM_OPTION_MODULE_GROUP])) {
$module = $options[Constants::FORM_OPTION_MODULE_GROUP];
}
$position = 'before:help';
if (TRUE === isset($options[Constants::FORM_OPTION_MODULE_POSITION])) {
$position = $options[Constants::FORM_OPTION_MODULE_POSITION];
}
$navigationComponent = '';
if (TRUE === isset($options[Constants::FORM_OPTION_MODULE_PAGE_TREE]) && TRUE === (bool) $options[Constants::FORM_OPTION_MODULE_PAGE_TREE]) {
$navigationComponent = 'typo3-pagetree';
}
$icon = MiscellaneousUtility::getIconForTemplate($form);
if (TRUE === empty($icon)) {
$icon = 'EXT:' . $extensionKey . '/ext_icon.gif';
}
if (NULL === $this->getResolver()->resolveFluxControllerClassNameByExtensionKeyAndAction($qualifiedExtensionName, 'render', 'Backend')) {
throw new \RuntimeException('Attempt to register a Backend controller without an associated BackendController. Extension key: ' . $extensionKey, 1368826271);
}
$moduleConfiguration = array('access' => 'user,group', 'icon' => $icon, 'labels' => 'LLL:EXT:' . $extensionKey . '/Resources/Private/Language/locallang_module_' . $formId . '.xlf');
if (FALSE === empty($navigationComponent)) {
$moduleConfiguration['navigationComponentId'] = $navigationComponent;
}
$moduleSignature = 'tx_' . $signature . '_' . ucfirst($formId);
if (FALSE === isset($GLOBALS['TBE_MODULES'][$module])) {
if (FALSE === strpos($position, ':')) {
if ('top' === $position) {
$temp_TBE_MODULES = array($module => '');
$temp_TBE_MODULES = RecursiveArrayUtility::mergeRecursiveOverrule($temp_TBE_MODULES, $GLOBALS['TBE_MODULES']);
} else {
$temp_TBE_MODULES = (array) $GLOBALS['TBE_MODULES'];
$temp_TBE_MODULES[$module] = '';
}
} else {
list($command, $relativeKey) = explode(':', $position);
foreach ($GLOBALS['TBE_MODULES'] as $key => $val) {
if ($key === $relativeKey) {
if ('before' === $command) {
$temp_TBE_MODULES[$module] = '';
$temp_TBE_MODULES[$key] = $val;
} else {
$temp_TBE_MODULES[$key] = $val;
$temp_TBE_MODULES[$module] = '';
}
} else {
$temp_TBE_MODULES[$key] = $val;
}
}
}
$GLOBALS['TBE_MODULES'] = (array) $temp_TBE_MODULES;
// register pseudo-module acting as group header
$moduleConfiguration['labels'] = 'LLL:EXT:' . $extensionKey . '/Resources/Private/Language/locallang_modulegroup.xlf';
ExtensionUtility::registerModule($qualifiedExtensionName, $module, '', $position, array('Backend' => 'render,save'), $moduleConfiguration);
}
// register individual module in group
$moduleConfiguration['labels'] = 'LLL:EXT:' . $extensionKey . '/Resources/Private/Language/locallang_module_' . $formId . '.xlf';
ExtensionUtility::registerModule($qualifiedExtensionName, $module, $moduleSignature, $position, array('Backend' => 'render,save'), $moduleConfiguration);
}