Esempio n. 1
1
 /**
  * Get all articles and return them as array
  * @param \DataContainer
  * @return array
  */
 public function getAllArticles(\DataContainer $dc)
 {
     $user = \BackendUser::getInstance();
     $pids = array();
     $articles = array();
     // Limit pages to the user's pagemounts
     if ($user->isAdmin) {
         $objArticle = \Database::getInstance()->execute("SELECT a.id, a.pid, a.title, a.inColumn, p.title AS parent FROM tl_article a LEFT JOIN tl_page p ON p.id=a.pid ORDER BY parent, a.sorting");
     } else {
         foreach ($user->pagemounts as $id) {
             $pids[] = $id;
             $pids = array_merge($pids, \Database::getInstance()->getChildRecords($id, 'tl_page'));
         }
         if (empty($pids)) {
             return $articles;
         }
         $objArticle = \Database::getInstance()->execute("SELECT a.id, a.pid, a.title, a.inColumn, p.title AS parent FROM tl_article a LEFT JOIN tl_page p ON p.id=a.pid WHERE a.pid IN(" . implode(',', array_map('intval', array_unique($pids))) . ") ORDER BY parent, a.sorting");
     }
     // Edit the result
     if ($objArticle->numRows) {
         \Controller::loadLanguageFile('tl_article');
         while ($objArticle->next()) {
             $key = $objArticle->parent . ' (ID ' . $objArticle->pid . ')';
             $articles[$key][$objArticle->id] = $objArticle->title . ' (' . ($GLOBALS['TL_LANG']['tl_article'][$objArticle->inColumn] ?: $objArticle->inColumn) . ', ID ' . $objArticle->id . ')';
         }
     }
     return $articles;
 }
 /**
  * Get all provided config names for the backend config.
  *
  * @param GetMultipleConfigNamesEvent $event Event being handled.
  *
  * @return void
  *
  * @SuppressWarnings(PHPMD.Superglobals)
  */
 public static function handle(GetMultipleConfigNamesEvent $event)
 {
     $model = $event->getModel();
     if ($model->type != 'form_widget') {
         return;
     }
     if ($model->override) {
         $typeManager = static::getTypeManager();
         $names = $typeManager->getExistingNames($model->type);
         // filter not existing values. basically to remove widgets which only exists in Contao 3.3 when being in
         // Contao 3.2
         $names = array_intersect($names, array_keys($GLOBALS['TL_FFL']));
     } else {
         $names = array_keys($GLOBALS['TL_FFL']);
     }
     \Controller::loadLanguageFile('tl_form_field');
     $options = array();
     foreach ($names as $name) {
         if (isset($GLOBALS['TL_LANG']['FFL'][$name][0])) {
             $options[$name] = $GLOBALS['TL_LANG']['FFL'][$name][0];
         } else {
             $options[$name] = $name;
         }
     }
     $event->setOptions($options);
     $event->stopPropagation();
 }
Esempio n. 3
0
    public function getArticleOptions(CreateOptionsEvent $event)
    {
        \Controller::loadLanguageFile('tl_article');
        $database = \Database::getInstance();
        $dataContainer = $event->getDataContainer();
        $options = $event->getOptions();
        // add articles in this page to options array
        $resultSet = $database->prepare('SELECT a.id, a.title, a.inColumn
				 FROM tl_article a
				 INNER JOIN tl_article b
				 ON a.pid = b.pid
				 INNER JOIN tl_content c
				 ON c.pid = b.id
				 WHERE c.id = ?
				 ORDER BY a.inColumn, a.sorting')->execute($dataContainer->id);
        while ($resultSet->next()) {
            if (isset($GLOBALS['TL_LANG']['tl_article'][$resultSet->inColumn])) {
                $sectionName = $GLOBALS['TL_LANG']['tl_article'][$resultSet->inColumn];
            } else {
                $sectionName = $resultSet->inColumn;
            }
            if (isset($GLOBALS['TL_LANG']['tl_article'][$sectionName])) {
                $sectionName = $GLOBALS['TL_LANG']['tl_article'][$sectionName];
            }
            $options[$sectionName][$resultSet->id] = $resultSet->title;
        }
    }
Esempio n. 4
0
 /**
  * Constructor
  */
 public function __construct()
 {
     // If we are in the Backend-Mode use the BackendUser.
     if (TL_MODE == 'FE') {
         $this->user = \FrontendUser::getInstance();
     } else {
         $this->user = \BackendUser::getInstance();
     }
     // Language
     \Controller::loadLanguageFile("default");
     \Controller::loadLanguageFile('tl_synccto_clients');
     // Instance a list for regex from the blacklist for folders.
     $this->arrPreparedBlacklistFolder = array();
     foreach ($this->getBlacklistFolder() as $key => $value) {
         $this->arrPreparedBlacklistFolder[$key] = str_replace($this->arrSearch, $this->arrReplace, $value);
     }
     // Instance a list for regex from the blacklist for files.
     $this->arrPreparedBlacklistFiles = array();
     foreach ($this->getBlacklistFile() as $key => $value) {
         $this->arrPreparedBlacklistFiles[$key] = str_replace($this->arrSearch, $this->arrReplace, $value);
     }
     // Instance a list for regex from the hidden table list.
     $this->arrPreparedHiddenTablePlaceholder = array();
     foreach ($this->getHiddenTablePlaceholder() as $key => $value) {
         $this->arrPreparedHiddenTablePlaceholder[$key] = str_replace($this->arrSearch, $this->arrReplace, $value);
     }
     // Replace some elements in TL_ROOT for regex.
     $this->strPreparedTlRoot = str_replace('\\', '\\\\', TL_ROOT);
 }
 /**
  * Construct.
  *
  * @param Manager   $manager  Data container manager.
  * @param \Database $database Database connection.
  * @param array     $layers   Leaflet layer configuration.
  */
 public function __construct(Manager $manager, \Database $database, array $layers)
 {
     parent::__construct($manager);
     $this->database = $database;
     $this->layers = $layers;
     \Controller::loadLanguageFile('leaflet_layer');
 }
 public function __construct($arrAttributes = null)
 {
     parent::__construct($arrAttributes);
     \Controller::loadLanguageFile(\Config::get('fieldpalette_table'));
     \Controller::loadLanguageFile($this->strTable);
     $this->import('Database');
     $this->arrDca = \HeimrichHannot\FieldPalette\FieldPalette::getDca($this->strTable, $this->strName);
     $this->viewMode = $this->arrDca['list']['viewMode'] ?: 0;
 }
 /**
  * Construct.
  *
  * @param Manager    $manager       Data container manager.
  * @param \Database  $database      Database connection.
  * @param Translator $translator    Translator.
  * @param array      $layers        Leaflet layer configuration.
  * @param array      $tileProviders Tile providers.
  * @param array      $amenities     OSM amenities.
  */
 public function __construct(Manager $manager, \Database $database, Translator $translator, array $layers, array $tileProviders, array $amenities)
 {
     parent::__construct($manager);
     \Controller::loadLanguageFile('leaflet_layer');
     $this->database = $database;
     $this->layers = $layers;
     $this->tileProviders = $tileProviders;
     $this->translator = $translator;
     $this->amenities = $amenities;
 }
 /**
  * {@inheritdoc}
  *
  * @SuppressWarnings(PHPMD.Superglobals)
  * @SuppressWarnings(PHPMD.CamelCaseVariableName)
  */
 public function getFieldDefinition($arrOverrides = array())
 {
     // Load the language files.
     \Controller::loadLanguageFile('tl_metamodel_attribute');
     \Controller::loadLanguageFile('default');
     $arrFieldDef = parent::getFieldDefinition($arrOverrides);
     $arrFieldDef['inputType'] = 'multiColumnWizard';
     $arrFieldDef['eval'] = array('columnFields' => array('gp_mode' => array('inputType' => 'select', 'eval' => array('style' => 'width:180px', 'includeBlankOption' => true, 'columnPos' => 'first'), 'options' => array('gp_show' => $GLOBALS['TL_LANG']['tl_metamodel_attribute']['gp_show'], 'gp_hide' => $GLOBALS['TL_LANG']['tl_metamodel_attribute']['gp_hide'])), 'gp_countries' => array('inputType' => 'checkbox', 'options' => $this->getSelectedCountries(), 'eval' => array('multiple' => true, 'columnPos' => 'first'))), 'buttons' => array('copy' => false, 'delete' => false, 'up' => false, 'down' => false));
     return $arrFieldDef;
 }
Esempio n. 9
0
    public function outputBackendTemplate($content, $template)
    {
        if ($GLOBALS['TL_CONFIG']['live_system_warning_enabled']) {
            \Controller::loadLanguageFile('live_system_warning');
            $template = new \BackendTemplate('be_live_system_warning');
            $template->url = $GLOBALS['TL_CONFIG']['live_system_warning_url'];
            $content = preg_replace('~<body[^>]*>~', '$0' . $template->parse(), $content);
            $content = str_replace('</head>', '<link rel="stylesheet" href="assets/live-system-warning/css/backend.css">
</head>', $content);
        }
        return $content;
    }
Esempio n. 10
0
 /**
  * Get config type options.
  *
  * @return array
  *
  * @SuppressWarnings(PHPMD.Superglobals)
  */
 public function getConfigTypes()
 {
     \Controller::loadLanguageFile('tl_bootstrap_config');
     $options = array();
     $collection = BootstrapConfigModel::findBy(array('(type = ? OR type=?)'), array('form_widget', 'form'), array('order' => 'name'));
     if ($collection) {
         foreach ($collection as $model) {
             $type = isset($GLOBALS['TL_LANG']['bootstrap_config_type'][$model->type]) ? $GLOBALS['TL_LANG']['bootstrap_config_type'][$model->type] : $model->type;
             $options[$model->id] = sprintf('%s (%s): %s %s (%s)', $model->getRelated('pid')->name, $model->pid, $type, $model->name, $model->id);
         }
     }
     return $options;
 }
 public function getFilterFields(\DataContainer $dataContainer)
 {
     \Controller::loadDataContainer('tl_calendar_events');
     \Controller::loadLanguageFile('tl_calendar_events');
     global $container, $TL_LANG;
     $options = array('pid' => $TL_LANG['tl_module']['filterPropertyCalendar'], 'author' => $TL_LANG['tl_module']['filterPropertyAuthor'], 'startDate' => $TL_LANG['tl_module']['filterPropertyMonth']);
     /** @var EventDispatcher $eventDispatcher */
     $eventDispatcher = $container['event-dispatcher'];
     $event = new GetFilterOptionsEvent();
     $event->setOptions($options);
     $eventDispatcher->dispatch(GetFilterOptionsEvent::NAME, $event);
     return $event->getOptions();
 }
 /**
  * Initialize the object
  *
  * @param \ParticipationModel $objConfig
  */
 public function __construct($objConfig)
 {
     parent::__construct();
     if ($objConfig instanceof \Model) {
         $this->objModel = $objConfig;
     } elseif ($objConfig instanceof \Model\Collection) {
         $this->objModel = $objConfig->current();
     }
     $this->arrData = $objConfig->row();
     \Controller::loadDataContainer($objConfig->type);
     \Controller::loadLanguageFile('default');
     $this->strTable = $objConfig->type;
     $this->ptable = $GLOBALS['TL_DCA'][$this->strTable]['config']['ptable'];
     $this->ctable = $GLOBALS['TL_DCA'][$this->strTable]['config']['ctable'];
 }
 /**
  * Initialize the object
  *
  * @param \ParticipationModel $objParticipation
  */
 public function __construct($objParticipation)
 {
     parent::__construct();
     if ($objParticipation instanceof \Model) {
         $this->objParticipation = $objParticipation;
     } elseif ($objParticipation instanceof \Model\Collection) {
         $this->objParticipation = $objParticipation->current();
     }
     $this->objParticipationArchive = $this->objParticipation->getRelated('pid');
     $this->arrData = $objParticipation->row();
     \Controller::loadDataContainer($objParticipation->targetType);
     \Controller::loadLanguageFile('default');
     $this->strTable = $objParticipation->targetType;
     $this->ptable = $GLOBALS['TL_DCA'][$this->targetType]['config']['ptable'];
     $this->ctable = $GLOBALS['TL_DCA'][$this->targetType]['config']['ctable'];
 }
Esempio n. 14
0
 /**
  * Create the data container of a metamodel table.
  *
  * @param string $strTableName the name of the meta model table that shall be created.
  *
  * @return bool true on success, false otherwise.
  */
 public function createDataContainer($strTableName)
 {
     if (!in_array($strTableName, MetaModelFactory::getAllTables())) {
         return false;
     }
     // call the loadDataContainer from Controller.php for the base DCA.
     parent::loadDataContainer('tl_metamodel_item');
     parent::loadLanguageFile('tl_metamodel_item');
     $GLOBALS['TL_DCA'][$strTableName] = array_replace_recursive($GLOBALS['TL_DCA']['tl_metamodel_item'], (array) $GLOBALS['TL_DCA'][$strTableName]);
     $arrDCA =& $GLOBALS['TL_DCA'][$strTableName];
     $arrDCA['dca_config']['data_provider']['default']['source'] = $strTableName;
     $objMetaModel = MetaModelFactory::byTableName($strTableName);
     if ($objMetaModel->isTranslated()) {
         $this->loadLanguageFile('languages');
     }
     $arrDCASettings = MetaModelDcaBuilder::getInstance()->getDca($objMetaModel->get('id'));
     $arrViewSettings = MetaModelDcaBuilder::getInstance()->getView($objMetaModel->get('id'));
     if (!$arrDCASettings) {
         $strMessage = sprintf($GLOBALS['TL_LANG']['ERR']['no_palette'], $objMetaModel->getName(), self::getUser()->username);
         MetaModelBackendModule::addMessageEntry($strMessage, METAMODELS_ERROR, $this->addToUrl('do=metamodels&table=tl_metamodel_dca&id=' . $objMetaModel->get('id')));
         $this->log($strMessage, 'MetaModelDatabase createDataContainer()', TL_ERROR);
         return true;
     }
     if (!$arrViewSettings) {
         $strMessage = sprintf($GLOBALS['TL_LANG']['ERR']['no_view'], $objMetaModel->getName(), self::getUser()->username);
         MetaModelBackendModule::addMessageEntry($strMessage, METAMODELS_ERROR, $this->addToUrl('do=metamodels&table=tl_metamodel_rendersettings&id=' . $objMetaModel->get('id')));
         $this->log($strMessage, 'MetaModelDatabase createDataContainer()', TL_ERROR);
         return true;
     }
     $arrDCA['config']['metamodel_view'] = $arrViewSettings['id'];
     $arrDCA['palettes']['default'] = $this->getPaletteAndFields($arrDCASettings['id'], $objMetaModel, $arrDCA);
     if ($arrDCASettings['backendcaption']) {
         $arrCaptions = deserialize($arrDCASettings['backendcaption'], true);
         foreach ($arrCaptions as $arrLangEntry) {
             if ($arrLangEntry['label'] != '' && $arrLangEntry['langcode'] == $objMetaModel->getActiveLanguage()) {
                 $arrDCA['config']['label'] = $arrLangEntry['label'];
             } else {
                 if ($arrLangEntry['label'] != '' && !$arrDCA['config']['label'] && $arrLangEntry['langcode'] == $objMetaModel->getFallbackLanguage()) {
                     $arrDCA['config']['label'] = $arrLangEntry['label'];
                 }
             }
         }
     }
     if (!$arrDCA['config']['label']) {
         $arrDCA['config']['label'] = $objMetaModel->get('name');
     }
     // Check access level.
     if ($arrDCASettings['isclosed']) {
         $arrDCA['config']['closed'] = true;
         $arrDCA['config']['notDeletable'] = true;
         unset($arrDCA['list']['operations']['delete']);
     }
     // FIXME: if we have variants, we force mode 5 here, no matter what the DCA configs say.
     if ($objMetaModel->hasVariants()) {
         $this->createDataContainerWithVariants($objMetaModel, $arrDCASettings, $arrDCA);
     } else {
         $this->createDataContainerNormal($objMetaModel, $arrDCASettings, $arrDCA);
     }
     $GLOBALS['TL_LANG'][$objMetaModel->getTableName()] = array_replace_recursive($GLOBALS['TL_LANG']['tl_metamodel_item'], (array) $GLOBALS['TL_LANG'][$objMetaModel->getTableName()]);
     // TODO: add a HOOK here for extensions to manipulate the DCA. loadMetaModelDataContainer($objMetaModel)
     //$GLOBALS['METAMODEL_HOOKS']['loadDataContainer']
     return true;
 }
<?php

/**
 * xNavigation - Highly extendable and flexible navigation module for the Contao Open Source CMS
 *
 * Copyright (C) 2013 bit3 UG <http://bit3.de>
 *
 * @package    xNavigation
 * @author     Tristan Lins <*****@*****.**>
 * @link       http://www.themeplus.de
 * @license    http://www.gnu.org/licenses/lgpl-3.0.html LGPL
 */
\Controller::loadLanguageFile('xnavigation_condition');
\Controller::loadLanguageFile('xnavigation_provider');
/**
 * Table tl_xnavigation_condition
 */
$GLOBALS['TL_DCA']['tl_xnavigation_condition'] = array('config' => array('dataContainer' => 'Table', 'enableVersioning' => true, 'sql' => array('keys' => array('id' => 'primary', 'pid' => 'index', 'type' => 'index'))), 'list' => array('sorting' => array('mode' => 5, 'icon' => 'system/modules/xnavigation/assets/images/condition.png', 'paste_button_callback' => array('Bit3\\Contao\\XNavigation\\DataContainer\\Condition', 'pasteButton'), 'panelLayout' => 'filter'), 'label' => array('fields' => array('type', 'title'), 'label_callback' => array('Bit3\\Contao\\XNavigation\\DataContainer\\Condition', 'getLabel')), 'global_operations' => array('create_default_condition' => array('label' => &$GLOBALS['TL_LANG']['tl_xnavigation_condition']['create_default_condition'], 'href' => 'key=create_default_condition', 'class' => 'header_new', 'attributes' => 'onclick="Backend.getScrollOffset();"'), 'menus' => array('label' => &$GLOBALS['TL_LANG']['tl_xnavigation_condition']['menus'], 'href' => 'table=tl_xnavigation_menu', 'class' => 'header_xnavigation_menus', 'attributes' => 'onclick="Backend.getScrollOffset();" accesskey="m"'), 'providers' => array('label' => &$GLOBALS['TL_LANG']['tl_xnavigation_condition']['providers'], 'href' => 'table=tl_xnavigation_provider', 'class' => 'header_xnavigation_providers', 'attributes' => 'onclick="Backend.getScrollOffset();" accesskey="p"'), 'all' => array('label' => &$GLOBALS['TL_LANG']['MSC']['all'], 'href' => 'act=select', 'class' => 'header_edit_all', 'attributes' => 'onclick="Backend.getScrollOffset();" accesskey="e"')), 'operations' => array('edit' => array('label' => &$GLOBALS['TL_LANG']['tl_xnavigation_condition']['edit'], 'href' => 'act=edit', 'icon' => 'edit.gif'), 'copy' => array('label' => &$GLOBALS['TL_LANG']['tl_xnavigation_condition']['copy'], 'href' => 'act=copy', 'icon' => 'copy.gif'), 'copyChilds' => array('label' => &$GLOBALS['TL_LANG']['tl_xnavigation_condition']['copyChilds'], 'href' => 'act=paste&amp;mode=copy&amp;childs=1', 'icon' => 'copychilds.gif', 'attributes' => 'onclick="Backend.getScrollOffset()"'), 'cut' => array('label' => &$GLOBALS['TL_LANG']['tl_xnavigation_condition']['cut'], 'href' => 'act=paste&amp;mode=cut', 'icon' => 'cut.gif', 'attributes' => 'onclick="Backend.getScrollOffset()"'), 'delete' => array('label' => &$GLOBALS['TL_LANG']['tl_xnavigation_condition']['delete'], 'href' => 'act=delete', 'icon' => 'delete.gif', 'attributes' => 'onclick="if (!confirm(\'' . $GLOBALS['TL_LANG']['MSC']['deleteConfirm'] . '\')) return false; Backend.getScrollOffset();"'), 'show' => array('label' => &$GLOBALS['TL_LANG']['tl_xnavigation_condition']['show'], 'href' => 'act=show', 'icon' => 'show.gif'))), 'palettes' => array('__selector__' => array('type')), 'metapalettes' => array('default' => array('condition' => array('type')), 'parent' => array('condition' => array('type', 'title')), 'and' => array('condition' => array('type', 'title'), 'settings' => array('invert')), 'or' => array('condition' => array('type', 'title'), 'settings' => array('invert')), 'item_type' => array('condition' => array('type', 'title'), 'type' => array('item_type_accepted_type'), 'settings' => array('invert')), 'level' => array('condition' => array('type', 'title'), 'settings' => array('level_min', 'level_max', 'invert')), 'member_login' => array('condition' => array('type', 'title'), 'settings' => array('member_login_accepted_login_status', 'invert')), 'link' => array('condition' => array('type', 'title'), 'settings' => array('link_condition_id', 'invert'))), 'fields' => array('id' => array('sql' => "int(10) unsigned NOT NULL auto_increment"), 'pid' => array('sql' => "int(10) unsigned NOT NULL default '0'"), 'sorting' => array('sql' => "int(10) unsigned NOT NULL default '0'"), 'tstamp' => array('sql' => "int(10) unsigned NOT NULL default '0'"), 'type' => array('label' => &$GLOBALS['TL_LANG']['tl_xnavigation_condition']['type'], 'inputType' => 'select', 'filter' => true, 'sorting' => true, 'flag' => 11, 'options' => array_keys($GLOBALS['XNAVIGATION_CONDITION']), 'reference' => &$GLOBALS['TL_LANG']['xnavigation_condition'], 'eval' => array('mandatory' => true, 'chosen' => true, 'helpwizard' => true, 'includeBlankOption' => true, 'submitOnChange' => true, 'tl_class' => 'w50'), 'sql' => "varchar(32) NOT NULL default ''"), 'title' => array('label' => &$GLOBALS['TL_LANG']['tl_xnavigation_condition']['title'], 'inputType' => 'text', 'search' => true, 'sorting' => true, 'flag' => 1, 'eval' => array('tl_class' => 'w50', 'maxlength' => 255), 'sql' => "varchar(255) NOT NULL default ''"), 'item_type_accepted_type' => array('label' => &$GLOBALS['TL_LANG']['tl_xnavigation_condition']['item_type_accepted_type'], 'inputType' => 'select', 'options' => array_keys($GLOBALS['XNAVIGATION_PROVIDER']), 'reference' => &$GLOBALS['TL_LANG']['xnavigation_provider'], 'eval' => array('tl_class' => 'w50', 'includeBlankOption' => true, 'mandatory' => true), 'sql' => "varchar(64) NOT NULL default ''"), 'level_min' => array('label' => &$GLOBALS['TL_LANG']['tl_xnavigation_condition']['level_min'], 'inputType' => 'text', 'eval' => array('tl_class' => 'w50', 'maxlength' => 10, 'rgxp' => 'digit'), 'sql' => "char(10) NOT NULL default ''"), 'level_max' => array('label' => &$GLOBALS['TL_LANG']['tl_xnavigation_condition']['level_max'], 'inputType' => 'text', 'eval' => array('tl_class' => 'w50', 'maxlength' => 10, 'rgxp' => 'digit'), 'sql' => "char(10) NOT NULL default ''"), 'member_login_accepted_login_status' => array('label' => &$GLOBALS['TL_LANG']['tl_xnavigation_condition']['member_login_accepted_login_status'], 'inputType' => 'select', 'options' => array('logged_in', 'logged_out'), 'reference' => &$GLOBALS['TL_LANG']['tl_xnavigation_condition']['member_login_accepted_login_statuses'], 'eval' => array('mandatory' => true, 'tl_class' => 'w50'), 'sql' => "varchar(10) NOT NULL default ''"), 'link_condition_id' => array('label' => &$GLOBALS['TL_LANG']['tl_xnavigation_condition']['link_condition_id'], 'inputType' => 'select', 'options_callback' => array('Bit3\\Contao\\XNavigation\\DataContainer\\OptionsBuilder', 'getConditionOptions'), 'eval' => array('includeBlankOption' => true, 'mandatory' => true, 'tl_class' => 'w50'), 'sql' => "varchar(10) NOT NULL default ''"), 'invert' => array('label' => &$GLOBALS['TL_LANG']['tl_xnavigation_condition']['invert'], 'inputType' => 'checkbox', 'eval' => array('tl_class' => 'w50 m12'), 'sql' => "char(1) NOT NULL default ''")));
 /**
  * Return all feViewable fields as array
  *
  * @param DataContainer $dc
  *
  * @return array
  */
 public function getViewableMemberFields(DataContainer $dc)
 {
     \Controller::loadDataContainer('tl_member');
     \Controller::loadLanguageFile('tl_member');
     $arrOptions = array();
     $arrFields = $GLOBALS['TL_DCA']['tl_member']['fields'];
     if (!is_array($arrFields) || empty($arrFields)) {
         return $arrOptions;
     }
     foreach ($arrFields as $strName => $arrData) {
         if (!isset($arrData['inputType'])) {
             continue;
         }
         if (!$arrData['eval']['feViewable']) {
             continue;
         }
         $arrOptions[$strName] = $arrData['label'][0];
     }
     return $arrOptions;
 }
 /**
  * Build language variables key files.
  *
  * @return string
  * @SuppressWarnings(PHPMD.Superglobals)
  * @SuppressWarnings(PHPMD.ExitExpression)
  */
 public function buildLanguageVariableKeys()
 {
     $template = new \BackendTemplate('be_translation_search_build_keys');
     if (\Input::post('FORM_SUBMIT') == 'tl_translation_search_build_keys') {
         $this->cleanTranslationFiles();
         $template->translations = $this->getTranslations();
         if (!$template->translations) {
             $_SESSION['TL_INFO'][] = $GLOBALS['TL_LANG']['tl_translation']['nothingtodo'];
             \Controller::reload();
         }
     } elseif (\Input::get('translation')) {
         // get the next translation group
         $translation = \Input::get('translation');
         $file = new File('system/languages/langkeys.' . $translation . '.php');
         $file->write("<?php if (!defined('TL_ROOT')) die('You can not access this file directly!');\n\n/**\n * DO NOT MODIFY THIS FILE, IT IS GENERATED BY THE LANGUAGE EDITOR!\n */\n");
         // load the language
         \Controller::loadLanguageFile($this->languageEditor->getLanguageFileName($translation));
         if (is_array($GLOBALS['TL_LANG'][$translation])) {
             $this->languageVariableKeys = array();
             $this->buildLanguageVariableKeysFrom($translation, $translation, $GLOBALS['TL_LANG'][$translation]);
             ksort($this->languageVariableKeys);
             foreach ($this->languageVariableKeys as $translation => $v) {
                 foreach ($v as $path => $config) {
                     $key = sprintf('$GLOBALS[\'TL_TRANSLATION\'][\'%s\'][\'%s\']', $translation, $path);
                     $value = var_export($config, true);
                     $file->append($key . ' = ' . $value . ";\n");
                 }
             }
         }
         $file->close();
         header('Content-Type: image/png');
         $handle = fopen(TL_ROOT . '/system/modules/language-editor/html/complete.png', 'rb');
         fpassthru($handle);
         fclose($handle);
         exit;
     } else {
         // get translation keys found by the TranslationSearch::buildTranslationKeys method
         $files = new \RegexIterator(new \DirectoryIterator(TL_ROOT . '/system/languages/'), '#^langkeys\\..*\\.php$#');
         foreach ($files as $file) {
             require_once $file->getPathname();
         }
     }
     return $template->parse();
 }
Esempio n. 18
0
 /**
  * Construct.
  *
  * @SuppressWarnings(PHPMD.Superglobals)
  */
 public function __construct()
 {
     $this->layers =& $GLOBALS['LEAFLET_LAYERS'];
     $this->database = static::getServiceContainer()->getDatabaseConnection();
     \Controller::loadLanguageFile('leaflet_layer');
 }
 /**
  * @param $strLanguage
  * @param $varEntity object|array
  *
  * @return string
  */
 public static function createSalutation($strLanguage, $varEntity, $blnInformal = false, $blnInformalFirstname = false)
 {
     if (is_array($varEntity)) {
         $varEntity = Arrays::arrayToObject($varEntity);
     }
     $blnHasFirstname = $varEntity->firstname;
     $blnHasLastname = $varEntity->lastname;
     $blnHasTitle = $varEntity->title && $varEntity->title != '-' && $varEntity->title != 'Titel' && $varEntity->title != 'Title';
     if ($strLanguage) {
         \Controller::loadLanguageFile('default', $strLanguage);
     }
     switch ($strLanguage) {
         case 'en':
             if ($blnInformal) {
                 if ($blnHasFirstname && $blnInformalFirstname) {
                     return $GLOBALS['TL_LANG']['notification_center_plus']['salutation'] . ' ' . $varEntity->firstname;
                 } elseif ($blnHasLastname && !$blnInformalFirstname) {
                     return $GLOBALS['TL_LANG']['notification_center_plus']['salutation'] . ' ' . $varEntity->lastname;
                 } else {
                     return $GLOBALS['TL_LANG']['notification_center_plus']['salutation'];
                 }
             } elseif ($blnHasLastname) {
                 if ($blnHasTitle) {
                     $strSalutation = $GLOBALS['TL_LANG']['notification_center_plus']['salutation'] . ' ' . $varEntity->title;
                 } else {
                     $strSalutation = $GLOBALS['TL_LANG']['notification_center_plus']['salutation' . ($varEntity->gender == 'female' ? 'Female' : 'Male')];
                 }
                 return $strSalutation . ' ' . $varEntity->lastname;
             } else {
                 return $GLOBALS['TL_LANG']['notification_center_plus']['salutationGeneric'];
             }
             break;
         default:
             // de
             if ($blnInformal) {
                 if ($blnHasFirstname && $blnInformalFirstname) {
                     return $GLOBALS['TL_LANG']['notification_center_plus']['salutationGenericInformal'] . ' ' . $varEntity->firstname;
                 } elseif ($blnHasLastname && !$blnInformalFirstname) {
                     return $GLOBALS['TL_LANG']['notification_center_plus']['salutationGenericInformal'] . ' ' . $varEntity->lastname;
                 } else {
                     return $GLOBALS['TL_LANG']['notification_center_plus']['salutationGenericInformal'];
                 }
             } elseif ($blnHasLastname && !$blnInformal) {
                 $strSalutation = $GLOBALS['TL_LANG']['notification_center_plus']['salutation' . ($varEntity->gender == 'female' ? 'Female' : 'Male')];
                 if ($blnHasTitle) {
                     $strSalutation .= ' ' . $varEntity->title;
                 }
                 return $strSalutation . ' ' . $varEntity->lastname;
             } else {
                 return $GLOBALS['TL_LANG']['notification_center_plus']['salutationGeneric'];
             }
             break;
     }
 }
<?php

/**
 * @package    dev
 * @author     David Molineus <*****@*****.**>
 * @copyright  2014 netzmacht creative David Molineus
 * @license    LGPL 3.0
 * @filesource
 *
 */
$GLOBALS['TL_DCA']['tl_leaflet_layer'] = array('config' => array('dataContainer' => 'Table', 'enableVersioning' => true, 'ctable' => array('tl_leaflet_vector', 'tl_leaflet_marker'), 'ondelete_callback' => array(array('Netzmacht\\Contao\\Leaflet\\Dca\\Layer', 'deleteRelations')), 'sql' => array('keys' => array('id' => 'primary', 'pid' => 'index', 'alias' => 'unique')), 'onload_callback' => array(function () {
    \Controller::loadLanguageFile('leaflet');
})), 'list' => array('sorting' => array('mode' => 5, 'fields' => array('title'), 'flag' => 1, 'icon' => 'system/modules/leaflet/assets/img/layers.png', 'panelLayout' => 'filter;search,limit', 'paste_button_callback' => array('Netzmacht\\Contao\\Leaflet\\Dca\\Layer', 'getPasteButtons')), 'label' => array('fields' => array('title'), 'format' => '%s', 'label_callback' => array('Netzmacht\\Contao\\Leaflet\\Dca\\Layer', 'generateRow')), 'global_operations' => array('styles' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['styles'], 'href' => 'table=tl_leaflet_style', 'icon' => 'system/modules/leaflet/assets/img/style.png', 'attributes' => 'onclick="Backend.getScrollOffset();"'), 'icons' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['icons'], 'href' => 'table=tl_leaflet_icon', 'icon' => 'system/modules/leaflet/assets/img/icons.png', 'attributes' => 'onclick="Backend.getScrollOffset();"'), 'popups' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['popups'], 'href' => 'table=tl_leaflet_popup', 'icon' => 'system/modules/leaflet/assets/img/popup.png', 'attributes' => 'onclick="Backend.getScrollOffset();"'), 'all' => array('label' => &$GLOBALS['TL_LANG']['MSC']['all'], 'href' => 'act=select', 'class' => 'header_edit_all', 'attributes' => 'onclick="Backend.getScrollOffset();"')), 'operations' => array('markers' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['markers'], 'href' => 'table=tl_leaflet_marker', 'icon' => 'edit.gif', 'button_callback' => array('Netzmacht\\Contao\\Leaflet\\Dca\\Layer', 'generateMarkersButton')), 'vectors' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['vectors'], 'href' => 'table=tl_leaflet_vector', 'icon' => 'edit.gif', 'button_callback' => array('Netzmacht\\Contao\\Leaflet\\Dca\\Layer', 'generateVectorsButton')), 'edit' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['edit'], 'href' => 'act=edit', 'icon' => 'header.gif'), 'copy' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['copy'], 'href' => 'act=copy', 'icon' => 'copy.gif'), 'cut' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['cut'], 'href' => 'act=paste&amp;mode=cut', 'icon' => 'cut.gif', 'attributes' => 'onclick="Backend.getScrollOffset()"'), 'delete' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['delete'], 'href' => 'act=delete', 'icon' => 'delete.gif', 'attributes' => 'onclick="if(!confirm(\'' . $GLOBALS['TL_LANG']['MSC']['deleteConfirm'] . '\'))return false;Backend.getScrollOffset()"'), 'toggle' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['toggle'], 'icon' => 'visible.gif', 'attributes' => 'onclick="Backend.getScrollOffset();return AjaxRequest.toggleVisibility(this,%s)"', 'button_callback' => \Netzmacht\Contao\Toolkit\Dca::createToggleIconCallback('tl_leaflet_layer', 'active')), 'show' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['show'], 'href' => 'act=show', 'icon' => 'show.gif'))), 'palettes' => array('__selector__' => array('type')), 'metapalettes' => array('default' => array('title' => array('title', 'alias', 'type'), 'config' => array(), 'expert' => array(':hide'), 'active' => array('active')), 'markers extends default' => array('+expert' => array('pointToLayer'), '+config' => array('deferred', 'boundsMode')), 'group extends default' => array('+title' => array('groupType'), '+active' => array('boundsMode')), 'vectors extends default' => array('+expert' => array('onEachFeature', 'pointToLayer'), '+config' => array('deferred', 'boundsMode')), 'reference extends default' => array('+title' => array('reference', 'standalone')), 'markercluster extends default' => array('config' => array('showCoverageOnHover', 'zoomToBoundsOnClick', 'removeOutsideVisibleBounds', 'animateAddingMarkers', 'spiderfyOnMaxZoom', 'disableClusteringAtZoom', 'maxClusterRadius', 'singleMarkerMode'), '+expert' => array('polygonOptions', 'iconCreateFunction', 'disableDefaultStyle')), 'tile extends default' => array('config' => array('tileUrl', 'subdomains', 'attribution', 'minZoom', 'maxZoom'), '+expert' => array('errorTileUrl', 'tileSize', 'tms', 'continuousWorld', 'noWrap', 'zoomReverse', 'zoomOffset', 'maxNativeZoom', 'opacity', 'zIndex', 'unloadvisibleTiles', 'updateWhenIdle', 'detectRetina', 'reuseTiles', 'bounds'))), 'metasubselectpalettes' => array('type' => array('provider' => array('tile_provider', 'tile_provider_variant')), 'tile_provider' => array('MapBox' => array('tile_provider_key'), 'HERE' => array('tile_provider_key', 'tile_provider_code'))), 'metasubpalettes' => array('spiderfyOnMaxZoom' => array('spiderfyDistanceMultiplier')), 'fields' => array('id' => array('sql' => "int(10) unsigned NOT NULL auto_increment"), 'pid' => array('sql' => "int(10) unsigned NOT NULL default '0'"), 'sorting' => array('sql' => "int(10) unsigned NOT NULL default '0'"), 'tstamp' => array('sql' => "int(10) unsigned NOT NULL default '0'"), 'title' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['title'], 'exclude' => true, 'inputType' => 'text', 'search' => true, 'eval' => array('mandatory' => true, 'maxlength' => 255, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'alias' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['alias'], 'exclude' => true, 'inputType' => 'text', 'search' => true, 'save_callback' => array(\Netzmacht\Contao\Leaflet\Dca\Helper::createGenerateAliasCallback('tl_leaflet_layer', 'title')), 'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true), 'sql' => "varchar(255) NOT NULL default ''"), 'type' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['type'], 'exclude' => true, 'inputType' => 'select', 'filter' => true, 'eval' => array('mandatory' => true, 'tl_class' => 'w50', 'includeBlankOption' => true, 'submitOnChange' => true, 'chosen' => true, 'helpwizard' => true), 'options' => array_keys($GLOBALS['LEAFLET_LAYERS']), 'reference' => &$GLOBALS['TL_LANG']['leaflet_layer'], 'sql' => "varchar(32) NOT NULL default ''"), 'active' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['active'], 'exclude' => true, 'inputType' => 'checkbox', 'filter' => true, 'eval' => array('tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default ''"), 'tile_provider' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['tile_provider'], 'exclude' => true, 'inputType' => 'select', 'eval' => array('mandatory' => true, 'tl_class' => 'w50 clr', 'includeBlankOption' => true, 'submitOnChange' => true, 'chosen' => true), 'options' => array_keys($GLOBALS['LEAFLET_TILE_PROVIDERS']), 'sql' => "varchar(32) NOT NULL default ''"), 'tile_provider_variant' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['tile_provider_variant'], 'exclude' => true, 'inputType' => 'select', 'eval' => array('mandatory' => false, 'tl_class' => 'w50', 'submitOnChange' => true, 'chosen' => false), 'options_callback' => array('Netzmacht\\Contao\\Leaflet\\Dca\\Layer', 'getVariants'), 'sql' => "varchar(32) NOT NULL default ''"), 'tile_provider_key' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['tile_provider_key'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 255, 'tl_class' => 'clr w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'tile_provider_code' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['tile_provider_code'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 255, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'deferred' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['deferred'], 'exclude' => true, 'inputType' => 'checkbox', 'default' => true, 'eval' => array('tl_class' => 'w50 m12', 'submitOnChange' => true, 'isBoolean' => true), 'sql' => "char(1) NOT NULL default '1'"), 'groupType' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['groupType'], 'exclude' => true, 'inputType' => 'select', 'eval' => array('mandatory' => true, 'tl_class' => 'w50', 'submitOnChange' => true, 'helpwizard' => true), 'default' => 'layer', 'options' => array('layer', 'feature'), 'reference' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['groupTypes'], 'sql' => "varchar(32) NOT NULL default ''"), 'reference' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['reference'], 'exclude' => true, 'inputType' => 'select', 'options_callback' => array('Netzmacht\\Contao\\Leaflet\\Dca\\Layer', 'getLayers'), 'eval' => array('mandatory' => true, 'tl_class' => 'w50', 'chosen' => true, 'includeBlankOption' => true), 'sql' => "int(10) unsigned NOT NULL default '0'"), 'standalone' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['standalone'], 'exclude' => true, 'inputType' => 'checkbox', 'default' => false, 'eval' => array('tl_class' => 'w50', 'submitOnChange' => false, 'isBoolean' => true), 'sql' => "char(1) NOT NULL default ''"), 'onEachFeature' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['onEachFeature'], 'exclude' => true, 'inputType' => 'textarea', 'eval' => array('preserveTags' => true, 'decodeEntities' => true, 'allowHtml' => true, 'rte' => 'ace|javascript', 'tl_class' => 'clr'), 'sql' => "mediumtext NULL"), 'pointToLayer' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['pointToLayer'], 'exclude' => true, 'inputType' => 'textarea', 'eval' => array('preserveTags' => true, 'decodeEntities' => true, 'allowHtml' => true, 'rte' => 'ace|javascript', 'tl_class' => 'clr'), 'sql' => "mediumtext NULL"), 'showCoverageOnHover' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['showCoverageOnHover'], 'exclude' => true, 'inputType' => 'checkbox', 'default' => true, 'eval' => array('tl_class' => 'w50', 'submitOnChange' => false, 'isBoolean' => true), 'sql' => "char(1) NOT NULL default '1'"), 'zoomToBoundsOnClick' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['zoomToBoundsOnClick'], 'exclude' => true, 'inputType' => 'checkbox', 'default' => true, 'eval' => array('tl_class' => 'w50', 'submitOnChange' => false, 'isBoolean' => true), 'sql' => "char(1) NOT NULL default '1'"), 'spiderfyOnMaxZoom' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['spiderfyOnMaxZoom'], 'exclude' => true, 'inputType' => 'checkbox', 'default' => true, 'eval' => array('tl_class' => 'w50 m12', 'submitOnChange' => true, 'isBoolean' => true), 'sql' => "char(1) NOT NULL default '1'"), 'removeOutsideVisibleBounds' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['removeOutsideVisibleBounds'], 'exclude' => true, 'inputType' => 'checkbox', 'default' => true, 'eval' => array('tl_class' => 'w50', 'submitOnChange' => false, 'isBoolean' => true), 'sql' => "char(1) NOT NULL default '1'"), 'animateAddingMarkers' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['animateAddingMarkers'], 'exclude' => true, 'inputType' => 'checkbox', 'default' => false, 'eval' => array('tl_class' => 'w50', 'submitOnChange' => false, 'isBoolean' => true), 'sql' => "char(1) NOT NULL default ''"), 'disableClusteringAtZoom' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['disableClusteringAtZoom'], 'exclude' => true, 'inputType' => 'select', 'options_callback' => array('Netzmacht\\Contao\\Leaflet\\Dca\\Leaflet', 'getZoomLevels'), 'default' => '', 'eval' => array('maxlength' => 4, 'rgxp' => 'digit', 'tl_class' => 'w50', 'includeBlankOption' => true, 'nullIfEmpty' => true), 'sql' => "int(4) NULL"), 'maxClusterRadius' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['maxClusterRadius'], 'exclude' => true, 'inputType' => 'text', 'default' => null, 'eval' => array('maxlength' => 5, 'rgxp' => 'digit', 'tl_class' => 'w50', 'nullIfEmpty' => true), 'sql' => "int(5) NULL"), 'singleMarkerMode' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['singleMarkerMode'], 'exclude' => true, 'inputType' => 'checkbox', 'default' => false, 'eval' => array('tl_class' => 'w50 m12', 'submitOnChange' => false, 'isBoolean' => true), 'sql' => "char(1) NOT NULL default ''"), 'polygonOptions' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['polygonOptions'], 'exclude' => true, 'inputType' => 'textarea', 'eval' => array('preserveTags' => true, 'decodeEntities' => true, 'allowHtml' => true, 'rte' => 'ace|json', 'tl_class' => 'clr'), 'sql' => "mediumtext NULL"), 'spiderfyDistanceMultiplier' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['spiderfyDistanceMultiplier'], 'exclude' => true, 'inputType' => 'text', 'default' => null, 'eval' => array('maxlength' => 5, 'rgxp' => 'digit', 'tl_class' => 'w50', 'nullIfEmpty' => true), 'sql' => "int(5) NULL"), 'iconCreateFunction' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['iconCreateFunction'], 'exclude' => true, 'inputType' => 'textarea', 'eval' => array('preserveTags' => true, 'decodeEntities' => true, 'allowHtml' => true, 'rte' => 'ace|javascript', 'tl_class' => 'clr'), 'sql' => "mediumtext NULL"), 'disableDefaultStyle' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['disableDefaultStyle'], 'exclude' => true, 'inputType' => 'checkbox', 'default' => false, 'eval' => array('tl_class' => 'w50', 'submitOnChange' => false, 'isBoolean' => true), 'sql' => "char(1) NOT NULL default ''"), 'boundsMode' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['boundsMode'], 'exclude' => true, 'inputType' => 'select', 'options_callback' => array('Netzmacht\\Contao\\Leaflet\\Dca\\Layer', 'getBoundsModes'), 'eval' => array('tl_class' => 'w50', 'includeBlankOption' => true), 'sql' => "varchar(6) NOT NULL default ''"), 'tileUrl' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['tileUrl'], 'exclude' => true, 'inputType' => 'text', 'default' => '', 'eval' => array('maxlength' => 255, 'tl_class' => 'w50', 'mandatory' => true), 'sql' => "varchar(255) NOT NULL default ''"), 'minZoom' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['minZoom'], 'exclude' => true, 'inputType' => 'select', 'options_callback' => array('Netzmacht\\Contao\\Leaflet\\Dca\\Leaflet', 'getZoomLevels'), 'eval' => array('maxlength' => 4, 'rgxp' => 'digit', 'tl_class' => 'w50', 'includeBlankOption' => true, 'nullIfEmpty' => true), 'sql' => "int(4) NULL"), 'maxZoom' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['maxZoom'], 'exclude' => true, 'inputType' => 'select', 'options_callback' => array('Netzmacht\\Contao\\Leaflet\\Dca\\Leaflet', 'getZoomLevels'), 'eval' => array('maxlength' => 4, 'rgxp' => 'digit', 'tl_class' => 'w50', 'includeBlankOption' => true, 'nullIfEmpty' => true), 'sql' => "int(4) NULL"), 'maxNativeZoom' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['maxNativeZoom'], 'exclude' => true, 'inputType' => 'select', 'options_callback' => array('Netzmacht\\Contao\\Leaflet\\Dca\\Leaflet', 'getZoomLevels'), 'eval' => array('maxlength' => 4, 'rgxp' => 'digit', 'tl_class' => 'w50', 'includeBlankOption' => true, 'nullIfEmpty' => true), 'sql' => "int(4) NULL"), 'tileSize' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['tileSize'], 'exclude' => true, 'inputType' => 'text', 'default' => null, 'eval' => array('maxlength' => 5, 'rgxp' => 'digit', 'tl_class' => 'w50', 'nullIfEmpty' => true), 'sql' => "int(5) NULL"), 'subdomains' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['subdomains'], 'exclude' => true, 'inputType' => 'text', 'default' => '', 'eval' => array('maxlength' => 16, 'tl_class' => 'w50'), 'sql' => "varchar(16) NOT NULL default ''"), 'errorTileUrl' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['errorTileUrl'], 'exclude' => true, 'inputType' => 'text', 'default' => '', 'eval' => array('maxlength' => 255, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'attribution' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['attribution'], 'exclude' => true, 'inputType' => 'text', 'default' => '', 'eval' => array('maxlength' => 255, 'tl_class' => 'long', 'allowHtml' => true), 'sql' => "varchar(255) NOT NULL default ''"), 'tms' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['tms'], 'exclude' => true, 'inputType' => 'checkbox', 'default' => false, 'eval' => array('tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default ''"), 'continuousWorld' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['continuousWorld'], 'exclude' => true, 'inputType' => 'checkbox', 'default' => false, 'eval' => array('tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default ''"), 'noWrap' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['noWrap'], 'exclude' => true, 'inputType' => 'checkbox', 'default' => false, 'eval' => array('tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default ''"), 'zoomOffset' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['zoomOffset'], 'exclude' => true, 'inputType' => 'text', 'default' => null, 'eval' => array('maxlength' => 5, 'rgxp' => 'digit', 'tl_class' => 'w50', 'nullIfEmpty' => true), 'sql' => "int(5) NULL"), 'zoomReverse' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['zoomReverse'], 'exclude' => true, 'inputType' => 'checkbox', 'default' => false, 'eval' => array('tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default ''"), 'opacity' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['opacity'], 'exclude' => true, 'inputType' => 'text', 'default' => '1.0', 'eval' => array('mandatory' => false, 'maxlength' => 4, 'rgxp' => 'digit', 'tl_class' => 'w50 clr'), 'sql' => "varchar(4) NOT NULL default ''"), 'zIndex' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['zIndex'], 'exclude' => true, 'inputType' => 'text', 'default' => null, 'eval' => array('maxlength' => 5, 'rgxp' => 'digit', 'tl_class' => 'w50', 'nullIfEmpty' => true), 'sql' => "int(5) NULL"), 'unloadvisibleTiles' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['unloadvisibleTiles'], 'exclude' => true, 'inputType' => 'checkbox', 'default' => false, 'eval' => array('tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default ''"), 'updateWhenIdle' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['updateWhenIdle'], 'exclude' => true, 'inputType' => 'checkbox', 'default' => false, 'eval' => array('tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default ''"), 'detectRetina' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['detectRetina'], 'exclude' => true, 'inputType' => 'checkbox', 'default' => false, 'eval' => array('tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default ''"), 'reuseTiles' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['reuseTiles'], 'exclude' => true, 'inputType' => 'checkbox', 'default' => false, 'eval' => array('tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default ''"), 'bounds' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['bounds'], 'exclude' => true, 'inputType' => 'text', 'save_callback' => array(), 'eval' => array('maxlength' => 255, 'multiple' => true, 'size' => 2, 'tl_class' => 'long clr', 'nullIfEmpty' => true), 'sql' => "mediumblob NULL")));
<?php

/**
 * Quick Product Content Element for Isotope eCommerce and Contao Open Source CMS
 *
 * Copyright (C) 2015 Rhyme.Digital
 *
 * @package    Isotope_Quickproducts
 * @link       http://rhyme.digital
 * @license    http://opensource.org/licenses/lgpl-3.0.html
 */
\Controller::loadDataContainer('tl_module');
\Controller::loadLanguageFile('tl_module');
/**
 * Palettes
 */
$GLOBALS['TL_DCA']['tl_content']['palettes']['isotope_quick'] = '{type_legend},type,headline;{include_legend},iso_products;{config_legend},iso_listingSortField,iso_listingSortDirection,iso_cols,iso_use_quantity,iso_buttons,iso_addProductJumpTo;{template_settings},iso_gallery,iso_list_layout;{protected_legend:hide},protected;{expert_legend:hide},guests,cssID,space;{invisible_legend:hide},invisible,start,stop';
/**
 * Fields
 */
$GLOBALS['TL_DCA']['tl_content']['fields']['iso_products'] = array('label' => &$GLOBALS['TL_LANG']['tl_content']['iso_products'], 'exclude' => true, 'inputType' => 'tableLookup', 'sql' => "blob NULL", 'eval' => array('mandatory' => true, 'doNotSaveEmpty' => true, 'tl_class' => 'clr', 'foreignTable' => 'tl_iso_product', 'fieldType' => 'checkbox', 'listFields' => array('type' => "type", 'name', 'sku'), 'searchFields' => array('name', 'alias', 'sku', 'description'), 'sqlWhere' => 'pid=0', 'searchLabel' => 'Search products'));
$GLOBALS['TL_DCA']['tl_content']['fields']['iso_gallery'] = array('label' => &$GLOBALS['TL_LANG']['tl_content']['iso_gallery'], 'exclude' => true, 'inputType' => 'select', 'foreignKey' => \Isotope\Model\Gallery::getTable() . '.name', 'eval' => array('includeBlankOption' => true, 'chosen' => true, 'tl_class' => 'w50'), 'sql' => "int(10) unsigned NOT NULL default '0'");
$GLOBALS['TL_DCA']['tl_content']['fields']['iso_list_layout'] = array('label' => &$GLOBALS['TL_LANG']['tl_content']['iso_list_layout'], 'exclude' => true, 'inputType' => 'select', 'options_callback' => function (\DataContainer $dc) {
    return \Isotope\Backend::getTemplates('iso_list_');
}, 'eval' => array('includeBlankOption' => true, 'tl_class' => 'w50', 'chosen' => true), 'sql' => "varchar(64) NOT NULL default ''");
$GLOBALS['TL_DCA']['tl_content']['fields']['iso_use_quantity'] = array('label' => &$GLOBALS['TL_LANG']['tl_content']['iso_use_quantity'], 'exclude' => true, 'inputType' => 'checkbox', 'eval' => array('tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default ''");
$GLOBALS['TL_DCA']['tl_content']['fields']['iso_cols'] = array('label' => &$GLOBALS['TL_LANG']['tl_content']['iso_cols'], 'exclude' => true, 'default' => 1, 'inputType' => 'text', 'eval' => array('maxlength' => 1, 'rgxp' => 'digit', 'tl_class' => 'w50'), 'sql' => "int(1) unsigned NOT NULL default '1'");
$GLOBALS['TL_DCA']['tl_content']['fields']['iso_buttons'] = array('label' => &$GLOBALS['TL_LANG']['tl_content']['iso_buttons'], 'exclude' => true, 'inputType' => 'checkboxWizard', 'default' => array('add_to_cart'), 'options_callback' => array('Isotope\\Backend\\Module\\Callback', 'getButtons'), 'eval' => array('multiple' => true, 'tl_class' => 'clr'), 'sql' => "blob NULL");
$GLOBALS['TL_DCA']['tl_content']['fields']['iso_listingSortField'] = array('label' => &$GLOBALS['TL_LANG']['tl_content']['iso_listingSortField'], 'exclude' => true, 'inputType' => 'select', 'options_callback' => array('Isotope\\Backend\\Module\\Callback', 'getSortingFields'), 'eval' => array('includeBlankOption' => true, 'tl_class' => 'clr w50'), 'sql' => "varchar(255) NOT NULL default ''");
$GLOBALS['TL_DCA']['tl_content']['fields']['iso_listingSortDirection'] = array('label' => &$GLOBALS['TL_LANG']['tl_content']['iso_listingSortDirection'], 'exclude' => true, 'default' => 'DESC', 'inputType' => 'select', 'options' => array('DESC', 'ASC'), 'reference' => &$GLOBALS['TL_LANG']['tl_content']['sortingDirection'], 'eval' => array('tl_class' => 'w50'), 'sql' => "varchar(8) NOT NULL default ''");
$GLOBALS['TL_DCA']['tl_content']['fields']['iso_cart_jumpTo'] = array('label' => &$GLOBALS['TL_LANG']['tl_content']['iso_cart_jumpTo'], 'exclude' => true, 'inputType' => 'pageTree', 'foreignKey' => 'tl_page.title', 'eval' => array('fieldType' => 'radio', 'tl_class' => 'clr'), 'explanation' => 'jumpTo', 'sql' => "int(10) unsigned NOT NULL default '0'", 'relation' => array('type' => 'hasOne', 'load' => 'lazy'));
Esempio n. 22
0
 /**
  * constructor
  */
 public function __construct()
 {
     \Controller::loadLanguageFile('default');
     \Controller::loadLanguageFile('modules');
 }
Esempio n. 23
0
 /**
  * Construct.
  */
 public function __construct()
 {
     \Controller::loadLanguageFile('workflow');
     \Controller::loadLanguageFile('workflow_permissions');
 }
Esempio n. 24
0
 /**
  * List a front end module
  *
  * @param array $row
  *
  * @return string
  */
 public function listModule($row)
 {
     if ($row['type'] == 'block') {
         \Controller::loadLanguageFile('tl_block');
         $icon = '<a href="' . $this->addToUrl('&table=tl_block_module&id=' . $row['block']) . '" title="' . specialchars($GLOBALS['TL_LANG']['tl_block']['show'][0]) . '">' . Image::getHtml('/system/modules/blocks/assets/icon.png', $GLOBALS['TL_LANG']['MOD']['blocks'], 'style="vertical-align: -4px;"') . '</a> ';
         return '<div style="float:left">' . $icon . $row['name'] . ' <span style="color:#b3b3b3;padding-left:3px">[' . (isset($GLOBALS['TL_LANG']['FMD'][$row['type']][0]) ? $GLOBALS['TL_LANG']['FMD'][$row['type']][0] : $row['type']) . ']</span>' . "</div>\n";
     }
     return parent::listModule($row);
 }
Esempio n. 25
0
<?php

/**
 * Assetic for Contao Open Source CMS
 *
 * @copyright 2014 bit3 UG <http://bit3.de>
 * @author    Tristan Lins <*****@*****.**>
 * @package   bit3/contao-assetic
 * @license   http://www.gnu.org/licenses/lgpl-3.0.html LGPL-3.0+
 * @filesource
 */
\Controller::loadLanguageFile('assetic');
\Controller::loadLanguageFile('tl_assetic_filter_chain');
/**
 * Table tl_assetic_filter
 */
$GLOBALS['TL_DCA']['tl_assetic_filter'] = array('config' => array('dataContainer' => 'Table', 'enableVersioning' => true, 'sql' => array('keys' => array('id' => 'primary'))), 'list' => array('sorting' => array('mode' => 2, 'fields' => array('type'), 'flag' => 1, 'panelLayout' => 'filter;sort,search,limit'), 'label' => array('fields' => array('type', 'note'), 'format' => '%s', 'label_callback' => array('Bit3\\Contao\\Assetic\\DataContainer\\AsseticFilter', 'filterLabel')), 'global_operations' => array('all' => array('label' => &$GLOBALS['TL_LANG']['MSC']['all'], 'href' => 'act=select', 'class' => 'header_edit_all', 'attributes' => 'onclick="Backend.getScrollOffset()" accesskey="e"')), 'operations' => array('edit' => array('label' => &$GLOBALS['TL_LANG']['tl_assetic_filter']['edit'], 'href' => 'act=edit', 'icon' => 'edit.gif'), 'delete' => array('label' => &$GLOBALS['TL_LANG']['tl_assetic_filter']['delete'], 'href' => 'act=delete', 'icon' => 'delete.gif', 'attributes' => 'onclick="if(!confirm(\'' . $GLOBALS['TL_LANG']['MSC']['deleteConfirm'] . '\'))return false;Backend.getScrollOffset()"'), 'show' => array('label' => &$GLOBALS['TL_LANG']['tl_assetic_filter']['show'], 'href' => 'act=show', 'icon' => 'show.gif', 'attributes' => 'style="margin-right:3px"'))), 'palettes' => array('__selector__' => array('type')), 'metapalettes' => array('default' => array('filter' => array('type')), 'coffee' => array('filter' => array('type', 'note'), 'coffee' => array('coffeePath', 'nodePath'), 'status' => array('disabled', 'notInDebug')), 'compass' => array('filter' => array('type', 'note'), 'compass' => array('compassPath', 'rubyPath'), 'status' => array('disabled', 'notInDebug')), 'cssEmbed' => array('filter' => array('type', 'note'), 'cssEmbed' => array('cssEmbedPath', 'javaPath'), 'status' => array('disabled', 'notInDebug')), 'cssImport' => array('filter' => array('type', 'note'), 'cssImport' => array('importFilter'), 'status' => array('disabled', 'notInDebug')), 'cssMin' => array('filter' => array('type', 'note'), 'status' => array('disabled', 'notInDebug')), 'cssRewrite' => array('filter' => array('type', 'note'), 'status' => array('disabled', 'notInDebug')), 'dart' => array('filter' => array('type', 'note'), 'dart' => array('dartPath'), 'status' => array('disabled', 'notInDebug')), 'gss' => array('filter' => array('type', 'note'), 'gss' => array('gssPath', 'javaPath'), 'status' => array('disabled', 'notInDebug')), 'handlebars' => array('filter' => array('type', 'note'), 'handlebars' => array('handlebarsPath', 'nodePath'), 'status' => array('disabled', 'notInDebug')), 'jsImport' => array('filter' => array('type', 'note'), 'jsImport' => array('importFilterJs'), 'status' => array('disabled', 'notInDebug')), 'jsMin' => array('filter' => array('type', 'note'), 'status' => array('disabled', 'notInDebug')), 'jsMinPlus' => array('filter' => array('type', 'note'), 'status' => array('disabled', 'notInDebug')), 'less' => array('filter' => array('type', 'note'), 'less' => array('nodePath', 'nodePaths'), 'status' => array('disabled', 'notInDebug')), 'lessphp' => array('filter' => array('type', 'note'), 'status' => array('disabled', 'notInDebug')), 'packager' => array('filter' => array('type', 'note'), 'status' => array('disabled', 'notInDebug')), 'packer' => array('filter' => array('type', 'note'), 'status' => array('disabled', 'notInDebug')), 'phpCssEmbed' => array('filter' => array('type', 'note'), 'status' => array('disabled', 'notInDebug')), 'scssphp' => array('filter' => array('type', 'note'), 'status' => array('disabled', 'notInDebug')), 'stylus' => array('filter' => array('type', 'note'), 'stylus' => array('nodePath', 'nodePaths'), 'status' => array('disabled', 'notInDebug')), 'uglifyCss' => array('filter' => array('type', 'note'), 'uglifyCss' => array('uglifyCssPath', 'nodePath'), 'status' => array('disabled', 'notInDebug')), 'uglifyJs' => array('filter' => array('type', 'note'), 'uglifyJs' => array('uglifyJsPath', 'nodePath'), 'status' => array('disabled', 'notInDebug')), 'closureApi' => array('filter' => array('type', 'note'), 'status' => array('disabled', 'notInDebug')), 'closureJar' => array('filter' => array('type', 'note'), 'closure' => array('closurePath', 'javaPath'), 'status' => array('disabled', 'notInDebug')), 'sass' => array('filter' => array('type', 'note'), 'sass' => array('sassPath', 'rubyPath'), 'status' => array('disabled', 'notInDebug')), 'scss' => array('filter' => array('type', 'note'), 'scss' => array('sassPath', 'rubyPath'), 'status' => array('disabled', 'notInDebug')), 'yuiCss' => array('filter' => array('type', 'note'), 'yui' => array('yuiPath', 'javaPath'), 'status' => array('disabled', 'notInDebug')), 'yuiJs' => array('filter' => array('type', 'note'), 'yui' => array('yuiPath', 'javaPath'), 'status' => array('disabled', 'notInDebug'))), 'fields' => array('id' => array('sql' => "int(10) unsigned NOT NULL auto_increment"), 'tstamp' => array('sql' => "int(10) unsigned NOT NULL default '0'"), 'type' => array('label' => &$GLOBALS['TL_LANG']['tl_assetic_filter']['type'], 'inputType' => 'select', 'exclude' => true, 'sorting' => true, 'flag' => 1, 'filter' => true, 'options_callback' => array('Bit3\\Contao\\Assetic\\DataContainer\\AsseticFilter', 'getFilterTypeOptions'), 'reference' => $GLOBALS['TL_LANG']['assetic'], 'eval' => array('mandatory' => true, 'tl_class' => 'w50', 'includeBlankOption' => true, 'submitOnChange' => true), 'sql' => "varchar(128) NOT NULL default ''"), 'note' => array('label' => &$GLOBALS['TL_LANG']['tl_assetic_filter']['note'], 'inputType' => 'text', 'exclude' => true, 'flag' => 1, 'search' => true, 'eval' => array('maxlength' => 128, 'tl_class' => 'w50'), 'sql' => "varchar(128) NOT NULL default ''"), 'disabled' => array('label' => &$GLOBALS['TL_LANG']['tl_assetic_filter']['disabled'], 'inputType' => 'checkbox', 'exclude' => true, 'sorting' => true, 'flag' => 1, 'filter' => true, 'eval' => array('tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default ''"), 'notInDebug' => array('label' => &$GLOBALS['TL_LANG']['tl_assetic_filter']['notInDebug'], 'inputType' => 'checkbox', 'exclude' => true, 'sorting' => true, 'flag' => 1, 'filter' => true, 'eval' => array('tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default ''"), 'nodePath' => array('label' => &$GLOBALS['TL_LANG']['tl_assetic_filter']['nodePath'], 'inputType' => 'text', 'exclude' => true, 'eval' => array('maxlength' => 255, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'nodePaths' => array('label' => &$GLOBALS['TL_LANG']['tl_assetic_filter']['nodePaths'], 'inputType' => 'multiColumnWizard', 'exclude' => true, 'eval' => array('columnFields' => array('path' => array('label' => &$GLOBALS['TL_LANG']['tl_assetic_filter']['nodePathsPath'], 'inputType' => 'text', 'eval' => array('style' => 'width:500px'))), 'tl_class' => 'clr'), 'sql' => "blob NULL"), 'rubyPath' => array('label' => &$GLOBALS['TL_LANG']['tl_assetic_filter']['rubyPath'], 'inputType' => 'text', 'exclude' => true, 'eval' => array('maxlength' => 255, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'javaPath' => array('label' => &$GLOBALS['TL_LANG']['tl_assetic_filter']['javaPath'], 'inputType' => 'text', 'exclude' => true, 'eval' => array('maxlength' => 255, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'coffeePath' => array('label' => &$GLOBALS['TL_LANG']['tl_assetic_filter']['coffeePath'], 'inputType' => 'text', 'exclude' => true, 'eval' => array('maxlength' => 255, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'compassPath' => array('label' => &$GLOBALS['TL_LANG']['tl_assetic_filter']['compassPath'], 'inputType' => 'text', 'exclude' => true, 'eval' => array('maxlength' => 255, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'cssEmbedPath' => array('label' => &$GLOBALS['TL_LANG']['tl_assetic_filter']['cssEmbedPath'], 'inputType' => 'text', 'exclude' => true, 'eval' => array('mandatory' => true, 'maxlength' => 255, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'importFilter' => array('label' => &$GLOBALS['TL_LANG']['tl_assetic_filter']['importFilter'], 'inputType' => 'select', 'exclude' => true, 'options_callback' => array('Bit3\\Contao\\Assetic\\DataContainer\\AsseticFilter', 'getImportFilterOptions'), 'reference' => &$GLOBALS['TL_LANG']['assetic'], 'eval' => array('tl_class' => 'w50', 'includeBlankOption' => true), 'sql' => "blob NULL"), 'importFilterJs' => array('label' => &$GLOBALS['TL_LANG']['tl_assetic_filter']['importFilterJs'], 'inputType' => 'select', 'exclude' => true, 'options_callback' => array('Bit3\\Contao\\Assetic\\DataContainer\\AsseticFilter', 'getImportFilterJsOptions'), 'reference' => &$GLOBALS['TL_LANG']['assetic'], 'eval' => array('tl_class' => 'w50', 'includeBlankOption' => true), 'sql' => "blob NULL"), 'gssPath' => array('label' => &$GLOBALS['TL_LANG']['tl_assetic_filter']['gssPath'], 'inputType' => 'text', 'exclude' => true, 'eval' => array('mandatory' => true, 'maxlength' => 255, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'dartPath' => array('label' => &$GLOBALS['TL_LANG']['tl_assetic_filter']['dartPath'], 'inputType' => 'text', 'exclude' => true, 'eval' => array('maxlength' => 255, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'uglifyCssPath' => array('label' => &$GLOBALS['TL_LANG']['tl_assetic_filter']['uglifyCssPath'], 'inputType' => 'text', 'exclude' => true, 'eval' => array('mandatory' => true, 'maxlength' => 255, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'handlebarsPath' => array('label' => &$GLOBALS['TL_LANG']['tl_assetic_filter']['handlebarsPath'], 'inputType' => 'text', 'exclude' => true, 'eval' => array('maxlength' => 255, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'uglifyJsPath' => array('label' => &$GLOBALS['TL_LANG']['tl_assetic_filter']['uglifyJsPath'], 'inputType' => 'text', 'exclude' => true, 'eval' => array('mandatory' => true, 'maxlength' => 255, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'yuiPath' => array('label' => &$GLOBALS['TL_LANG']['tl_assetic_filter']['yuiPath'], 'inputType' => 'text', 'exclude' => true, 'eval' => array('mandatory' => true, 'maxlength' => 255, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'sassPath' => array('label' => &$GLOBALS['TL_LANG']['tl_assetic_filter']['sassPath'], 'inputType' => 'text', 'exclude' => true, 'eval' => array('maxlength' => 255, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'closurePath' => array('label' => &$GLOBALS['TL_LANG']['tl_assetic_filter']['closurePath'], 'inputType' => 'text', 'exclude' => true, 'eval' => array('mandatory' => true, 'maxlength' => 255, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''")));
Esempio n. 26
0
 /**
  * Ping the current client status
  *
  * @param string $strAction
  */
 public function pingClientStatus($strAction)
 {
     // Close the session handling.
     session_write_close();
     // Init some more things.
     \Controller::loadLanguageFile('tl_synccto_clients');
     // Check if the current call is one for use.
     if ($strAction != 'syncCtoPing') {
         return;
     }
     // Check if we have the id. If not end here.
     if (!$this->loadClientId()) {
         $this->addFatalError('Missing client id.');
         $this->output();
     }
     // Check if we have the entry in the database.
     if (!$this->loadClient()) {
         $this->addFatalError('Unknown client id.');
         $this->output();
     }
     // Run all pings.
     $this->ping();
 }
 public function __construct($email)
 {
     parent::__construct();
     $this->email = $email;
     \Controller::loadLanguageFile('tl_subscribe_plus');
 }
<?php

/**
 * xNavigation - Highly extendable and flexible navigation module for the Contao Open Source CMS
 *
 * Copyright (C) 2013 bit3 UG <http://bit3.de>
 *
 * @package    xNavigation
 * @author     Tristan Lins <*****@*****.**>
 * @link       http://www.themeplus.de
 * @license    http://www.gnu.org/licenses/lgpl-3.0.html LGPL
 */
\Controller::loadLanguageFile('tl_article');
/**
 * Table tl_xnavigation_provider
 */
$GLOBALS['TL_DCA']['tl_xnavigation_provider']['metapalettes']['article'] = array('provider' => array('type', 'title'), 'article' => array('article_columns'));
$GLOBALS['TL_DCA']['tl_xnavigation_provider']['fields']['article_columns'] = array('label' => &$GLOBALS['TL_LANG']['tl_xnavigation_provider']['article_columns'], 'inputType' => 'checkboxWizard', 'options_callback' => \ContaoCommunityAlliance\Contao\Events\CreateOptions\CreateOptionsEventCallbackFactory::createCallback(\Bit3\Contao\XNavigation\Article\XNavigationArticleEvents::BUILD_ARTICLE_SECTIONS), 'reference' => &$GLOBALS['TL_LANG']['tl_article'], 'eval' => array('mandatory' => true, 'multiple' => true), 'sql' => "text NULL");
 /**
  * @return bool true if dlh_googlemaps is available, otherwise false
  */
 private static function init()
 {
     if (!in_array('dlh_googlemaps', \ModuleLoader::getActive())) {
         return false;
     }
     \Controller::loadLanguageFile('tl_dlh_googlemaps');
     return true;
 }
<?php

/**
 * Contao Open Source CMS
 *
 * Copyright (c) 2014 Heimrich & Hannot GmbH
 * @package owlcarousel
 * @author Rico Kaltofen <*****@*****.**>
 * @license http://www.gnu.org/licences/lgpl-3.0.html LGPL
 */
$this->import('\\HeimrichHannot\\OwlCarousel\\Constants');
// Content Fields
\Controller::loadDataContainer('tl_content');
\Controller::loadLanguageFile('tl_content');
// reusable palettes extension for tl_news, tl_content, tl_module etc
$GLOBALS['TL_DCA']['tl_owlcarousel_spread'] = array('palettes' => array('__selector__' => array('addOwl', 'addGallery'), OWLCAROUSEL_PALETTE_DEFAULT => '{owlcarousel_legend},addOwl;', OWLCAROUSEL_PALETTE_PRESETCONFIG => '{owlcarousel_config},owlConfig;', OWLCAROUSEL_PALETTE_GALLERY => '{owlcarousel_gallery},addGallery;', OWLCAROUSEL_PALETTE_CONTENT => '{type_legend},type;{owlcarousel_config},owlConfig;{source_legend},multiSRC,sortBy,useHomeDir;{image_legend},size,fullsize,numberOfItems;{template_legend:hide},owlgalleryTpl,customTpl;{protected_legend:hide},protected;{expert_legend:hide},guests,cssID,space;{invisible_legend:hide},invisible,start,stop'), 'subpalettes' => array('addOwl' => 'owl_items,owl_margin,owl_loop,owl_center,
							owl_mouseDrag,owl_touchDrag,owl_pullDrag,owl_freeDrag,
							owl_stagePadding,owl_merge,owl_mergeFit,
							owl_autoHeight, owl_autoHeightClass,
							owl_autoWidth,owl_startPosition,owl_URLhashListener,
							owl_nav,owl_navRewind,owl_navText,
							owl_slideBy,
							owl_dots,owl_dotsEach,owl_dotData,
							owl_lazyLoad,owl_lazyContent,
							owl_autoplay,owl_autoplayTimeout,owl_autoplayHoverPause,
							owl_smartSpeed,owl_fluidSpeed,owl_autoplaySpeed,owl_navSpeed,owl_dotsSpeed,owl_dragEndSpeed,
							owl_callbacks,
							owl_responsive,owl_responsiveRefreshRate,owl_responsiveBaseElement,owl_responsiveClass,
							owl_video,owl_videoHeight,owl_videoWidth,
							owl_animateOut,owl_animateIn,owl_fallbackEasing,
							owl_rtl', 'addGallery' => 'owlMultiSRC,owlSortBy,owlUseHomeDir,owlSize,owlFullsize,owlNumberOfItems,owlgalleryTpl,owlCustomTpl'), 'fields' => array('owlConfig' => array('label' => &$GLOBALS['TL_LANG']['tl_owlcarousel_spread']['owlConfig'], 'inputType' => 'select', 'exclude' => true, 'foreignKey' => 'tl_owlconfig.title', 'sql' => "int(10) unsigned NOT NULL", 'wizard' => array(array('tl_owlcarousel_spread', 'editOwlConfig'))), 'addOwl' => array('label' => &$GLOBALS['TL_LANG']['tl_owlcarousel_spread']['addOwl'], 'inputType' => 'checkbox', 'exclude' => true, 'eval' => array('submitOnChange' => true), 'sql' => "char(1) NOT NULL default ''"), 'addGallery' => array('label' => &$GLOBALS['TL_LANG']['tl_owlcarousel_spread']['addGallery'], 'inputType' => 'checkbox', 'exclude' => true, 'eval' => array('submitOnChange' => true), 'sql' => "char(1) NOT NULL default ''"), 'owlMultiSRC' => $GLOBALS['TL_DCA']['tl_content']['fields']['multiSRC'], 'owlOrderSRC' => $GLOBALS['TL_DCA']['tl_content']['fields']['orderSRC'], 'owlSortBy' => $GLOBALS['TL_DCA']['tl_content']['fields']['sortBy'], 'owlUseHomeDir' => $GLOBALS['TL_DCA']['tl_content']['fields']['useHomeDir'], 'owlSize' => $GLOBALS['TL_DCA']['tl_content']['fields']['size'], 'owlFullsize' => $GLOBALS['TL_DCA']['tl_content']['fields']['fullsize'], 'owlNumberOfItems' => $GLOBALS['TL_DCA']['tl_content']['fields']['numberOfItems'], 'owlCustomTpl' => $GLOBALS['TL_DCA']['tl_content']['fields']['customTpl'], 'owlgalleryTpl' => array('label' => &$GLOBALS['TL_LANG']['tl_content']['galleryTpl'], 'exclude' => true, 'inputType' => 'select', 'options_callback' => array('tl_owlcarousel_spread', 'getGalleryTemplates'), 'eval' => array('tl_class' => 'w50'), 'sql' => "varchar(64) NOT NULL default ''"), 'owl_items' => array('label' => &$GLOBALS['TL_LANG']['tl_owlcarousel_spread']['owl_items'], 'inputType' => 'text', 'default' => 3, 'exclude' => true, 'eval' => array('tl_class' => 'w50', 'rgxp' => 'digit'), 'sql' => "smallint(5) unsigned NOT NULL default '0'"), 'owl_margin' => array('label' => &$GLOBALS['TL_LANG']['tl_owlcarousel_spread']['owl_margin'], 'inputType' => 'text', 'default' => 15, 'exclude' => true, 'eval' => array('tl_class' => 'w50', 'rgxp' => 'digit'), 'sql' => "smallint(5) unsigned NOT NULL default '0'"), 'owl_loop' => array('label' => &$GLOBALS['TL_LANG']['tl_owlcarousel_spread']['owl_loop'], 'inputType' => 'checkbox', 'exclude' => true, 'eval' => array('tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default ''"), 'owl_center' => array('label' => &$GLOBALS['TL_LANG']['tl_owlcarousel_spread']['owl_center'], 'inputType' => 'checkbox', 'exclude' => true, 'eval' => array('tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default ''"), 'owl_mouseDrag' => array('label' => &$GLOBALS['TL_LANG']['tl_owlcarousel_spread']['owl_mouseDrag'], 'inputType' => 'checkbox', 'exclude' => true, 'default' => 0, 'eval' => array('tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default ''"), 'owl_touchDrag' => array('label' => &$GLOBALS['TL_LANG']['tl_owlcarousel_spread']['owl_touchDrag'], 'inputType' => 'checkbox', 'exclude' => true, 'default' => 1, 'eval' => array('tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default ''"), 'owl_pullDrag' => array('label' => &$GLOBALS['TL_LANG']['tl_owlcarousel_spread']['owl_pullDrag'], 'inputType' => 'checkbox', 'exclude' => true, 'default' => 1, 'eval' => array('tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default ''"), 'owl_freeDrag' => array('label' => &$GLOBALS['TL_LANG']['tl_owlcarousel_spread']['owl_freeDrag'], 'inputType' => 'checkbox', 'exclude' => true, 'eval' => array('tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default ''"), 'owl_stagePadding' => array('label' => &$GLOBALS['TL_LANG']['tl_owlcarousel_spread']['owl_stagePadding'], 'inputType' => 'text', 'default' => 0, 'exclude' => true, 'eval' => array('tl_class' => 'w50', 'rgxp' => 'digit'), 'sql' => "smallint(5) unsigned NOT NULL default '0'"), 'owl_merge' => array('label' => &$GLOBALS['TL_LANG']['tl_owlcarousel_spread']['owl_merge'], 'inputType' => 'checkbox', 'exclude' => true, 'eval' => array('tl_class' => 'w50 clr', 'rgxp' => 'digit'), 'sql' => "char(1) NOT NULL default ''"), 'owl_mergeFit' => array('label' => &$GLOBALS['TL_LANG']['tl_owlcarousel_spread']['owl_mergeFit'], 'inputType' => 'checkbox', 'exclude' => true, 'default' => 1, 'eval' => array('tl_class' => 'w50', 'rgxp' => 'digit'), 'sql' => "char(1) NOT NULL default ''"), 'owl_autoHeight' => array('label' => &$GLOBALS['TL_LANG']['tl_owlcarousel_spread']['owl_autoHeight'], 'inputType' => 'checkbox', 'exclude' => true, 'eval' => array('tl_class' => 'w50 clr', 'rgxp' => 'digit'), 'sql' => "char(1) NOT NULL default ''"), 'owl_autoHeightClass' => array('label' => &$GLOBALS['TL_LANG']['tl_owlcarousel_spread']['owl_autoHeightClass'], 'inputType' => 'text', 'exclude' => true, 'default' => 'owl-height', 'eval' => array('tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'owl_autoWidth' => array('label' => &$GLOBALS['TL_LANG']['tl_owlcarousel_spread']['owl_autoWidth'], 'inputType' => 'checkbox', 'exclude' => true, 'eval' => array('tl_class' => 'w50', 'rgxp' => 'digit'), 'sql' => "char(1) NOT NULL default ''"), 'owl_startPosition' => array('label' => &$GLOBALS['TL_LANG']['tl_owlcarousel_spread']['owl_startPosition'], 'inputType' => 'text', 'default' => 0, 'exclude' => true, 'eval' => array('tl_class' => 'w50', 'rgxp' => 'digit'), 'sql' => "smallint(5) unsigned NOT NULL default '0'"), 'owl_URLhashListener' => array('label' => &$GLOBALS['TL_LANG']['tl_owlcarousel_spread']['owl_URLhashListener'], 'inputType' => 'checkbox', 'exclude' => true, 'eval' => array('tl_class' => 'w50', 'rgxp' => 'digit'), 'sql' => "char(1) NOT NULL default ''"), 'owl_nav' => array('label' => &$GLOBALS['TL_LANG']['tl_owlcarousel_spread']['owl_nav'], 'inputType' => 'checkbox', 'exclude' => true, 'default' => 1, 'eval' => array('tl_class' => 'w50 clr', 'rgxp' => 'digit'), 'sql' => "char(1) NOT NULL default ''"), 'owl_navRewind' => array('label' => &$GLOBALS['TL_LANG']['tl_owlcarousel_spread']['owl_navRewind'], 'inputType' => 'checkbox', 'exclude' => true, 'eval' => array('tl_class' => 'w50', 'rgxp' => 'digit'), 'sql' => "char(1) NOT NULL default ''"), 'owl_navText' => array('label' => &$GLOBALS['TL_LANG']['tl_owlcarousel_spread']['owl_navText'], 'inputType' => 'text', 'exclude' => true, 'default' => array('prev', 'next'), 'eval' => array('tl_class' => 'w50 clr', 'size' => 2, 'multiple' => true, 'allowHtml' => true), 'sql' => "varchar(255) NOT NULL default ''"), 'owl_slideBy' => array('label' => &$GLOBALS['TL_LANG']['tl_owlcarousel_spread']['owl_slideBy'], 'inputType' => 'text', 'default' => 1, 'exclude' => true, 'eval' => array('tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'owl_dots' => array('label' => &$GLOBALS['TL_LANG']['tl_owlcarousel_spread']['owl_dots'], 'inputType' => 'checkbox', 'exclude' => true, 'default' => 1, 'eval' => array('tl_class' => 'w50 clr', 'rgxp' => 'digit'), 'sql' => "char(1) NOT NULL default ''"), 'owl_dotsEach' => array('label' => &$GLOBALS['TL_LANG']['tl_owlcarousel_spread']['owl_dotsEach'], 'inputType' => 'text', 'default' => 0, 'exclude' => true, 'eval' => array('tl_class' => 'w50', 'rgxp' => 'digit'), 'sql' => "smallint(5) unsigned NOT NULL default '0'"), 'owl_dotData' => array('label' => &$GLOBALS['TL_LANG']['tl_owlcarousel_spread']['owl_dotData'], 'inputType' => 'checkbox', 'exclude' => true, 'eval' => array('tl_class' => 'w50', 'rgxp' => 'digit'), 'sql' => "char(1) NOT NULL default ''"), 'owl_lazyLoad' => array('label' => &$GLOBALS['TL_LANG']['tl_owlcarousel_spread']['owl_lazyLoad'], 'inputType' => 'checkbox', 'exclude' => true, 'eval' => array('tl_class' => 'w50 clr', 'rgxp' => 'digit'), 'sql' => "char(1) NOT NULL default ''"), 'owl_lazyContent' => array('label' => &$GLOBALS['TL_LANG']['tl_owlcarousel_spread']['owl_lazyContent'], 'inputType' => 'checkbox', 'exclude' => true, 'eval' => array('tl_class' => 'w50', 'rgxp' => 'digit'), 'sql' => "char(1) NOT NULL default ''"), 'owl_autoplay' => array('label' => &$GLOBALS['TL_LANG']['tl_owlcarousel_spread']['owl_autoplay'], 'inputType' => 'checkbox', 'exclude' => true, 'eval' => array('tl_class' => 'w50', 'rgxp' => 'digit'), 'sql' => "char(1) NOT NULL default ''"), 'owl_autoplayTimeout' => array('label' => &$GLOBALS['TL_LANG']['tl_owlcarousel_spread']['owl_autoplayTimeout'], 'inputType' => 'text', 'default' => 5000, 'exclude' => true, 'eval' => array('tl_class' => 'w50', 'rgxp' => 'digit'), 'sql' => "smallint(10) unsigned NOT NULL default '0'"), 'owl_autoplayHoverPause' => array('label' => &$GLOBALS['TL_LANG']['tl_owlcarousel_spread']['owl_autoplayHoverPause'], 'inputType' => 'checkbox', 'exclude' => true, 'default' => 1, 'eval' => array('tl_class' => 'w50', 'rgxp' => 'digit'), 'sql' => "char(1) NOT NULL default ''"), 'owl_smartSpeed' => array('label' => &$GLOBALS['TL_LANG']['tl_owlcarousel_spread']['owl_smartSpeed'], 'inputType' => 'text', 'default' => 250, 'exclude' => true, 'eval' => array('tl_class' => 'w50 clr', 'rgxp' => 'digit'), 'sql' => "smallint(10) unsigned NOT NULL default '0'"), 'owl_fluidSpeed' => array('label' => &$GLOBALS['TL_LANG']['tl_owlcarousel_spread']['owl_fluidSpeed'], 'inputType' => 'checkbox', 'exclude' => true, 'eval' => array('tl_class' => 'w50', 'rgxp' => 'digit'), 'sql' => "char(1) NOT NULL default ''"), 'owl_autoplaySpeed' => array('label' => &$GLOBALS['TL_LANG']['tl_owlcarousel_spread']['owl_autoplaySpeed'], 'inputType' => 'text', 'exclude' => true, 'eval' => array('tl_class' => 'w50 clr', 'rgxp' => 'digit'), 'sql' => "smallint(10) unsigned NOT NULL default '0'"), 'owl_navSpeed' => array('label' => &$GLOBALS['TL_LANG']['tl_owlcarousel_spread']['owl_navSpeed'], 'inputType' => 'text', 'exclude' => true, 'eval' => array('tl_class' => 'w50', 'rgxp' => 'digit'), 'sql' => "smallint(10) unsigned NOT NULL default '0'"), 'owl_dotsSpeed' => array('label' => &$GLOBALS['TL_LANG']['tl_owlcarousel_spread']['owl_dotsSpeed'], 'inputType' => 'text', 'exclude' => true, 'eval' => array('tl_class' => 'w50', 'rgxp' => 'digit'), 'sql' => "smallint(10) unsigned NOT NULL default '0'"), 'owl_dragEndSpeed' => array('label' => &$GLOBALS['TL_LANG']['tl_owlcarousel_spread']['owl_dragEndSpeed'], 'inputType' => 'text', 'exclude' => true, 'eval' => array('tl_class' => 'w50', 'rgxp' => 'digit'), 'sql' => "smallint(10) unsigned NOT NULL default '0'"), 'owl_callbacks' => array('label' => &$GLOBALS['TL_LANG']['tl_owlcarousel_spread']['owl_callbacks'], 'inputType' => 'checkbox', 'exclude' => true, 'default' => 1, 'eval' => array('tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default ''"), 'owl_responsive' => array('label' => &$GLOBALS['TL_LANG']['tl_owlcarousel_spread']['owl_responsive'], 'inputType' => 'multiColumnWizard', 'exclude' => true, 'eval' => array('tl_class' => 'clr', 'columnFields' => array('owl_breakpoint' => array('label' => &$GLOBALS['TL_LANG']['tl_owlcarousel_spread']['owl_breakpoint'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('style' => 'width:100px', 'rgxp' => 'digit')), 'owl_config' => array('label' => &$GLOBALS['TL_LANG']['tl_owlcarousel_spread']['owl_config'], 'inputType' => 'textarea', 'eval' => array('style' => 'width:500px; height: 80px;', 'rows' => 5, 'cols' => 20)))), 'sql' => "blob NULL"), 'owl_responsiveRefreshRate' => array('label' => &$GLOBALS['TL_LANG']['tl_owlcarousel_spread']['owl_responsiveRefreshRate'], 'inputType' => 'text', 'exclude' => true, 'default' => 200, 'eval' => array('tl_class' => 'w50', 'rgxp' => 'digit'), 'sql' => "smallint(10) unsigned NOT NULL default '0'"), 'owl_responsiveBaseElement' => array('label' => &$GLOBALS['TL_LANG']['tl_owlcarousel_spread']['owl_responsiveBaseElement'], 'inputType' => 'text', 'default' => 'window', 'exclude' => true, 'eval' => array('tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'owl_responsiveClass' => array('label' => &$GLOBALS['TL_LANG']['tl_owlcarousel_spread']['owl_responsiveClass'], 'inputType' => 'checkbox', 'exclude' => true, 'eval' => array('tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default ''"), 'owl_video' => array('label' => &$GLOBALS['TL_LANG']['tl_owlcarousel_spread']['owl_video'], 'inputType' => 'checkbox', 'exclude' => true, 'eval' => array('tl_class' => 'w50 clr'), 'sql' => "char(1) NOT NULL default ''"), 'owl_videoHeight' => array('label' => &$GLOBALS['TL_LANG']['tl_owlcarousel_spread']['owl_videoHeight'], 'inputType' => 'text', 'exclude' => true, 'eval' => array('tl_class' => 'w50 clr', 'rgxp' => 'digit'), 'sql' => "smallint(10) unsigned NOT NULL default '0'"), 'owl_videoWidth' => array('label' => &$GLOBALS['TL_LANG']['tl_owlcarousel_spread']['owl_videoWidth'], 'inputType' => 'text', 'exclude' => true, 'eval' => array('tl_class' => 'w50', 'rgxp' => 'digit'), 'sql' => "smallint(10) unsigned NOT NULL default '0'"), 'owl_animateOut' => array('label' => &$GLOBALS['TL_LANG']['tl_owlcarousel_spread']['owl_animateOut'], 'inputType' => 'text', 'exclude' => true, 'eval' => array('tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'owl_animateIn' => array('label' => &$GLOBALS['TL_LANG']['tl_owlcarousel_spread']['owl_animateIn'], 'inputType' => 'text', 'exclude' => true, 'eval' => array('tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'owl_fallbackEasing' => array('label' => &$GLOBALS['TL_LANG']['tl_owlcarousel_spread']['owl_fallbackEasing'], 'inputType' => 'text', 'default' => 'swing', 'exclude' => true, 'eval' => array('tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'owl_rtl' => array('label' => &$GLOBALS['TL_LANG']['tl_owlcarousel_spread']['owl_rtl'], 'inputType' => 'checkbox', 'exclude' => true, 'eval' => array('tl_class' => 'w50 clr'), 'sql' => "char(1) NOT NULL default ''")));