rtgx

Extbase

Extension configuration

Date 27.03.2017

Súbor ext_conf_template.txt # cat=basic/enable; type=int+; label=Page uid for new ProductsproductPid = Controller <?phpnamespace Vendor\ExtensionName\Controller;class ServiceController extends \Vendor\ExtensionName\Controller\AbstractController { /** * Extension configuration * * @var array */ protected $configuration...

Model: Validate examples

Date 28.03.2017

Ukážky validácie atribútov v modely Extbase. <?php/** * Order * */class Order extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity { /** * Address * * @var string * @validate NotEmpty */ protected $address = ''; /** * ZIP * * @var string * @validate NotEmpty, RegularExpression(regularExpression = '/[0-9]{5}$/') ...

Repository: Create, Update, Delete

Date 23.03.2017

Ukážky pochádzajú z Extbase Controller-a.

Controller: Built Standalone View

Date 27.03.2017

Ak potrebujeme zobraziť iný výstup, ako Extbase štandardne ponúka v spojení Controller-View, musíme sa o to postarať vytvorením vlastného View. Controler <?phpnamespace Vendor\ExtensionName\Controller;use TYPO3\CMS\Core\Utility\GeneralUtility;use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface;class...

Controller: Add meta tags

Date 29.03.2017

<?phpclass ShopController extends \Vendor\ExtensionName\Controller\AbstractController { public function showAction(\Vendor\ExtensionName\Domain\Model\Product $product) { // Add meta tags $this->response->addAdditionalHeaderData('<meta name="og:title"...

 
Žiadne dokumenty ani odkazy k tejto stránke.