PHP Class MetaModels\Dca\MetaModelDcaBuilder

Show file Open project: metamodels/core Class Usage Examples

Protected Properties

Property Type Description
$container MetaModels\IMetaModelsServiceContainer The service container.

Public Methods

Method Description
__construct ( MetaModels\IMetaModelsServiceContainer $container ) Create a new instance.
buildChildOperationButton ( string $idParameter, array $arrRow, string $href, string $label, string $name, string $icon, string $attributes, string $table ) : string This method exists only for being compatible when MetaModels are being used as child table from DC_Table context.
getBackendIcon ( string $icon, string $defaultIcon = 'system/modules/metamodels/assets/images/icons/metamodels.png' ) : string Get a 16x16 pixel resized icon of the passed image if it exists, return the default icon otherwise.
injectOperationButton ( MetaModels\BackendIntegration\InputScreen\IInputScreen $screen ) : void Inject an input screen into the DCA of a table.

Protected Methods

Method Description
getDB ( ) : Database Get Contao Database instance.
getDispatcher ( ) : Symfony\Component\EventDispatcher\EventDispatcherInterface Retrieve the event dispatcher from the DIC.

Method Details

__construct() public method

Create a new instance.
public __construct ( MetaModels\IMetaModelsServiceContainer $container )
$container MetaModels\IMetaModelsServiceContainer The container.

buildChildOperationButton() public method

This method exists only for being compatible when MetaModels are being used as child table from DC_Table context.
public buildChildOperationButton ( string $idParameter, array $arrRow, string $href, string $label, string $name, string $icon, string $attributes, string $table ) : string
$idParameter string The id parameter in use.
$arrRow array The current data row.
$href string The href to be appended.
$label string The operation label.
$name string The operation name.
$icon string The icon path.
$attributes string The button attributes.
$table string The table name.
return string

getBackendIcon() public method

Get a 16x16 pixel resized icon of the passed image if it exists, return the default icon otherwise.
public getBackendIcon ( string $icon, string $defaultIcon = 'system/modules/metamodels/assets/images/icons/metamodels.png' ) : string
$icon string The icon to resize.
$defaultIcon string The default icon.
return string

getDB() protected method

Get Contao Database instance.
protected getDB ( ) : Database
return Database

getDispatcher() protected method

Retrieve the event dispatcher from the DIC.
protected getDispatcher ( ) : Symfony\Component\EventDispatcher\EventDispatcherInterface
return Symfony\Component\EventDispatcher\EventDispatcherInterface

injectOperationButton() public method

Inject an input screen into the DCA of a table.
public injectOperationButton ( MetaModels\BackendIntegration\InputScreen\IInputScreen $screen ) : void
$screen MetaModels\BackendIntegration\InputScreen\IInputScreen The input screen that shall get injected.
return void

Property Details

$container protected property

The service container.
protected IMetaModelsServiceContainer,MetaModels $container
return MetaModels\IMetaModelsServiceContainer