This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class AcmeElement extends \ContentElement | |
| { | |
| /** | |
| * Template | |
| * @var string | |
| */ | |
| protected $strTemplate = 'ce_esit_default'; | |
| /** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div class="plz"> | |
| <?php echo $this->plz->getPostal(); ?> - | |
| <?php echo $this->plz->getCity(); ?> - | |
| <?php echo $this->plz->getCountry(); ?> | |
| </div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| src/ | |
| └── Acme | |
| └── TestBundle | |
| ├── classes | |
| │ └── contao | |
| │ └── elements | |
| └── Resources | |
| └── contao | |
| ├── config | |
| ├── language |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class AppKernel extends Kernel | |
| { | |
| public function registerBundles() | |
| { | |
| $bundles = [ | |
| // ... | |
| new Acme\TestBundle\AcmeTestBundle() | |
| ]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| #/src/Acme/TestBundle/Resources/contao/config/config.php | |
| $GLOBALS['TL_CTE']['acme']['testelement'] = '\Acme\TestBundle\classes\contao\elements\TestElement'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #/src/Acme/TestBundle/Resources/contao/templates/ce_testelement.html | |
| <div class="testelement"> | |
| <?php echo $this->content; ?> | |
| </div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace Acme\TestBundle\classes\contao\elements; | |
| class TestElement extends \ContentElement | |
| { | |
| protected $strTemplate = 'ce_testelement'; | |
| protected function compile() | |
| { | |
| if (TL_MODE == 'BE') { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| 'mytext' => [ | |
| 'label' => &$GLOBALS['TL_LANG'][$table]['mytext'], | |
| 'exclude' => true, | |
| 'sorting' => true, | |
| 'inputType' => 'text', | |
| 'eval' => ['maxlength'=>255, 'tl_class'=>'w50'], | |
| 'sql' => "varchar(255) NOT NULL default ''" | |
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| 'mypassword' => [ | |
| 'label' => &$GLOBALS['TL_LANG'][$table]['mypassword'], | |
| 'exclude' => true, | |
| 'inputType' => 'password', | |
| 'eval' => ['mandatory'=>true, 'preserveTags'=>true, 'minlength'=>\Contao\Config::get('minPasswordLength')], | |
| 'sql' => "varchar(128) NOT NULL default ''" | |
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| 'mytextarea' => [ | |
| 'label' => &$GLOBALS['TL_LANG'][$table]['mytextarea'], | |
| 'exclude' => true, | |
| 'search' => true, | |
| 'inputType' => 'textarea', | |
| 'eval' => ['rte'=>'tinyMCE', 'tl_class'=>'clr'], | |
| 'sql' => 'text NOT NULL' | |
| ] |