The Class HasKernelBundle
(Service-Name: tpoint.hasKernelBundle
) detects if the
var_dump($container->get('tpoint.hasKernelBundle')->check('tpointCoreBundle');
If you want to eventually throw an Exception without further activities:
$container->get('tpoint.hasKernelBundle')->checkThrowException('tpointCoreBundle');
Additionally, the Service is able to find all “similar” Bundles, if you pass a string.
var_dump($container->get('tpoint.hasKernelBundle')->getBundlesByName('tpoint');
// would return a list of all registered tpoint-Bundles
To check the existance of “short-names” of Controller-Actions (@tpointCoreBundle:Default:Index
would result into tpoint\CoreBundle\Controller\DefaultController::IndexAction()
), the following method can be used:
var_dump($container->get('tpoint.hasKernelBundle')->checkActionExists('@tpointCoreBundle:Default:Index');
Convert all translations to YML or JSON (to translate via Weblate or other translation-Service).
This Services are used via Symfony-Console:
$ php app/console tpoint:translation:convert --input="yml" --output="json" --bundle="tpointCoreBundle" --dest="self"
$ php app/console tpoint:translation:convert --input="json" --output="yml" --bundle="tpointCoreBundle" --dest="self"
Contains methods to “format” the JSON-Data (as Response in the AJAX-Controllers):
$helper = $this->get('ajaxHelper')
(The functions should be called as static methods! TODO-Action!!)
(to be removed)
configuration of the CoreBundle via config.yml
Service-Name: tpoint.formatter