[TYPO3-german] Re: Singelton Interface in Klassen verwenden

Deus master_hax at gmx.net
Thu Mar 17 07:43:58 CET 2016


Ich habe es soeben hinbekommen.
Wenn ich für jedes Interface ein eigenes File mache, dann funktioniert das.

Bsp:
StateInterface.php
namespace Indor\MyExt\Utility\Enum;

/**
 * Class StateInterface
 */
interface StateInterface extends \TYPO3\CMS\Core\SingletonInterface{
	const SUCCESS = "success";
	const ERROR = "error";
}

Aufruf in einer anderen Datei zB: einem Controller:
use Vendor\MyExt\Utility\Enum\StateInterface;

public function indexAction(){
       $hlp = StateInterface::SUCCESS;
}

lg



More information about the TYPO3-german mailing list