PHP code example of dwenzel / t3extension-tools

1. Go to this page and download the library: Download dwenzel/t3extension-tools library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

dwenzel / t3extension-tools example snippets



use DWenzel\T3extensionTools\Configuration\PluginConfigurationInterface;
use DWenzel\T3extensionTools\Configuration\PluginConfigurationTrait;

class MyPluginConfiguration implements PluginConfigurationInterface
{
    use PluginConfigurationTrait;

    public function getPluginName(): string
    {
        return 'MyPlugin';
    }

    public function getControllerActions(): array
    {
        return [
            'MyController' => 'list,show'
        ];
    }
}


use DWenzel\T3extensionTools\Command\ArgumentAwareInterface;
use DWenzel\T3extensionTools\Traits\Command\ArgumentAwareTrait;
use Symfony\Component\Console\Command\Command;

class MyCommand extends Command implements ArgumentAwareInterface
{
    use ArgumentAwareTrait;

    protected function configure(): void
    {
        $this->setDescription('My custom command');
        $this->configureArguments();
    }
}