var/cache/dev/contao/dca/tl_iso_address.php line 28

Open in your IDE?
  1. <?php
  2. namespace {
  3. /*
  4.  * Isotope eCommerce for Contao Open Source CMS
  5.  *
  6.  * Copyright (C) 2009 - 2019 terminal42 gmbh & Isotope eCommerce Workgroup
  7.  *
  8.  * @link       https://isotopeecommerce.org
  9.  * @license    https://opensource.org/licenses/lgpl-3.0.html
  10.  */
  11. /**
  12.  * Table tl_iso_address
  13.  */
  14. $GLOBALS['TL_DCA']['tl_iso_address'] = array(
  15.     // Config
  16.     'config' => array('dataContainer' => 'Table''enableVersioning' => \false'ptable' => '''dynamicPtable' => \true'onload_callback' => array(), 'sql' => array('keys' => array('id' => 'primary''pid,store_id' => 'index'))),
  17.     // List
  18.     'list' => array('sorting' => array('mode' => 4'headerFields' => array('firstname''lastname''username'), 'disableGrouping' => \true'flag' => 1'panelLayout' => 'filter;sort,search,limit''child_record_callback' => array('Isotope\\Backend\\Address\\Callback''renderLabel')), 'global_operations' => array('all' => array('href' => 'act=select''class' => 'header_edit_all''attributes' => 'onclick="Backend.getScrollOffset();"')), 'operations' => array('edit' => array('href' => 'act=edit''icon' => 'edit.svg'), 'copy' => array('href' => 'act=copy''icon' => 'copy.svg'), 'delete' => array('href' => 'act=delete''icon' => 'delete.svg''attributes' => 'onclick="if (!confirm(\'' . ($GLOBALS['TL_LANG']['MSC']['deleteConfirm'] ?? '') . '\')) return false; Backend.getScrollOffset();"'), 'show' => array('href' => 'act=show''icon' => 'show.svg'))),
  19.     // Palettes
  20.     'palettes' => array('default' => '{store_legend},label,store_id;{personal_legend},gender,salutation,firstname,lastname,dateOfBirth,company,vat_no;{address_legend},street_1,street_2,street_3,street_number_1,street_number_2,street_number_3,postal,city,subdivision,country;{contact_legend},email,phone;{default_legend:hide},isDefaultBilling,isDefaultShipping'),
  21.     // Fields
  22.     'fields' => array('id' => array('sql' => "int(10) unsigned NOT NULL auto_increment"), 'pid' => array('sql' => "int(10) unsigned NOT NULL default '0'"), 'tstamp' => array('sql' => "int(10) unsigned NOT NULL default '0'"), 'ptable' => array('sql' => "varchar(64) NOT NULL default ''"), 'label' => array('exclude' => \true'search' => \true'inputType' => 'text''eval' => array('maxlength' => 255'feEditable' => \true'feGroup' => 'address''tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'store_id' => array('exclude' => \true'filter' => \true'sorting' => \true'inputType' => 'text''eval' => array('mandatory' => \true'maxlength' => 2'rgxp' => 'digit''tl_class' => 'w50'), 'sql' => "int(2) unsigned NOT NULL default '0'"), 'gender' => array('exclude' => \true'inputType' => 'select''options' => array('male''female'), 'reference' => &$GLOBALS['TL_LANG']['MSC'], 'eval' => array('includeBlankOption' => \true'feEditable' => \true'feGroup' => 'personal''tl_class' => 'w50'), 'sql' => "varchar(32) NOT NULL default ''"), 'salutation' => array('exclude' => \true'inputType' => 'text''eval' => array('maxlength' => 255'feEditable' => \true'feGroup' => 'personal''tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'firstname' => array('exclude' => \true'search' => \true'inputType' => 'text''eval' => array('mandatory' => \true'maxlength' => 255'feEditable' => \true'feGroup' => 'personal''tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'lastname' => array('exclude' => \true'search' => \true'sorting' => \true'flag' => 1'inputType' => 'text''eval' => array('mandatory' => \true'maxlength' => 255'feEditable' => \true'feGroup' => 'personal''tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'dateOfBirth' => array('exclude' => \true'inputType' => 'text''eval' => array('rgxp' => 'date''datepicker' => \true'feEditable' => \true'feViewable' => \true'feGroup' => 'personal''tl_class' => 'w50 wizard'), 'sql' => "varchar(11) NOT NULL default ''"), 'company' => array('exclude' => \true'search' => \true'sorting' => \true'flag' => 1'inputType' => 'text''eval' => array('mandatory' => \false'maxlength' => 255'feEditable' => \true'feGroup' => 'address''tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'vat_no' => array('exclude' => \true'search' => \true'inputType' => 'text''eval' => array('maxlength' => 255'feEditable' => \true'feGroup' => 'address''tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'street_1' => array('exclude' => \true'search' => \true'inputType' => 'text''eval' => array('mandatory' => \true'maxlength' => 255'feEditable' => \true'feGroup' => 'address''tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'street_2' => array('exclude' => \true'search' => \true'inputType' => 'text''eval' => array('maxlength' => 255'feEditable' => \true'feGroup' => 'address''tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'street_3' => array('exclude' => \true'search' => \true'inputType' => 'text''eval' => array('maxlength' => 255'feEditable' => \true'feGroup' => 'address''tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'postal' => array('exclude' => \true'search' => \true'inputType' => 'text''eval' => array('mandatory' => \true'maxlength' => 32'feEditable' => \true'feGroup' => 'address''tl_class' => 'clr w50'), 'sql' => "varchar(32) NOT NULL default ''"), 'city' => array('exclude' => \true'filter' => \true'search' => \true'sorting' => \true'inputType' => 'text''eval' => array('mandatory' => \true'maxlength' => 255'feEditable' => \true'feGroup' => 'address''tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'subdivision' => array('exclude' => \true'sorting' => \true'inputType' => 'conditionalselect''options_callback' => array('Isotope\\Backend''getSubdivisions'), 'eval' => array('feEditable' => \true'feGroup' => 'address''conditionField' => 'country''includeBlankOption' => \true'tl_class' => 'w50'), 'sql' => "varchar(10) NOT NULL default ''"), 'country' => array(
  23.         'exclude' => \true,
  24.         'filter' => \true,
  25.         'sorting' => \true,
  26.         'inputType' => 'select',
  27.         'options' => \Contao\System::getCountries(),
  28.         // Do not use options_callback, countries are modified by store config in the frontend
  29.         'eval' => array('mandatory' => \true'feEditable' => \true'feGroup' => 'address''tl_class' => 'w50''chosen' => \true),
  30.         'sql' => "varchar(32) NOT NULL default ''",
  31.     ), 'phone' => array('exclude' => \true'search' => \true'inputType' => 'text''eval' => array('mandatory' => \false'maxlength' => 64'rgxp' => 'phone''feEditable' => \true'feGroup' => 'contact''tl_class' => 'w50'), 'sql' => "varchar(64) NOT NULL default ''"), 'email' => array('exclude' => \true'search' => \true'inputType' => 'text''eval' => array('mandatory' => \true'maxlength' => 64'rgxp' => 'email''feEditable' => \true'feGroup' => 'contact''tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'isDefaultBilling' => array('exclude' => \true'filter' => \true'inputType' => 'checkbox''eval' => array('feEditable' => \true'feGroup' => 'login''membersOnly' => \true'tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default ''"'save_callback' => array(array('Isotope\\Backend\\Address\\Callback''updateDefault'))), 'isDefaultShipping' => array('exclude' => \true'filter' => \true'inputType' => 'checkbox''eval' => array('feEditable' => \true'feGroup' => 'login''membersOnly' => \true'tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default ''"'save_callback' => array(array('Isotope\\Backend\\Address\\Callback''updateDefault')))),
  32. );
  33. /**
  34.  * Dynamically add parent table
  35.  */
  36. if ('member' === \Contao\Input::get('do')) {
  37.     $GLOBALS['TL_DCA']['tl_iso_address']['config']['ptable'] = 'tl_member';
  38. } elseif ('iso_orders' === \Contao\Input::get('do')) {
  39.     $GLOBALS['TL_DCA']['tl_iso_address']['config']['ptable'] = 'tl_iso_product_collection';
  40. }
  41. }
  42. namespace {
  43. $GLOBALS['TL_DCA']['tl_iso_address']['fields']['salutation'] = array('exclude' => \true'inputType' => 'radio''options' => array('Mrs.''Mr.'), 'reference' => &$GLOBALS['TL_LANG']['MSC'], 'eval' => array('maxlength' => 255'feEditable' => \true'feGroup' => 'personal''tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''");
  44. $positionOptions = array();
  45. \asort($positionOptions);
  46. $positionOptions \range(11000);
  47. $GLOBALS['TL_DCA']['tl_iso_address']['fields']['position'] = ['label' => &$GLOBALS['TL_LANG']['tl_iso_address']['position'], 'inputType' => 'select''options' => $positionOptions'reference' => &$GLOBALS['TL_LANG']['tl_iso_address']['position_option'], 'eval' => array('includeBlankOption' => \true'maxlength' => 255'feEditable' => \true'feGroup' => 'personal''tl_class' => 'w100'), 'sql' => "varchar(255) NOT NULL default ''"];
  48. $industryOptions = array();
  49. \asort($industryOptions);
  50. $industryOptions \range(11000);
  51. $GLOBALS['TL_DCA']['tl_iso_address']['fields']['industry'] = ['label' => &$GLOBALS['TL_LANG']['tl_iso_address']['industry'], 'inputType' => 'select''options' => $industryOptions'reference' => &$GLOBALS['TL_LANG']['tl_iso_address']['industry_option'], 'eval' => array('includeBlankOption' => \true'maxlength' => 255'feEditable' => \true'feGroup' => 'personal''tl_class' => 'w100'), 'sql' => "varchar(255) NOT NULL default ''"];
  52. \Contao\CoreBundle\DataContainer\PaletteManipulator::create()->addField('position''country'\Contao\CoreBundle\DataContainer\PaletteManipulator::POSITION_APPEND)->applyToPalette('default''tl_iso_address');
  53. }