Skip to content

Commit

Permalink
Rename example const TYPE_KEY to TEMPLATE_TYPE (#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-schranz authored and wachterjohannes committed Dec 17, 2019
1 parent 70a9b33 commit 6a58fb9
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Tests/Application/ExampleTestBundle/Admin/ExampleAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ public function configureViews(ViewCollection $viewCollection): void
$this->contentViewBuilder->build(
$viewCollection,
$resourceKey,
Example::TYPE_KEY,
Example::TEMPLATE_TYPE,
static::EDIT_TABS_VIEW,
static::ADD_TABS_VIEW
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ public function prepend(ContainerBuilder $container)
'content' => [
'structure' => [
'paths' => [
Example::TYPE_KEY => [
Example::TEMPLATE_TYPE => [
'path' => '%kernel.project_dir%/config/templates/examples',
'type' => 'example',
],
],
'default_type' => [
Example::TYPE_KEY => 'default', // TODO should not be hardcoded
Example::TEMPLATE_TYPE => 'default', // TODO should not be hardcoded
],
],
],
Expand Down
2 changes: 1 addition & 1 deletion Tests/Application/ExampleTestBundle/Entity/Example.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
class Example extends AbstractContentRichEntity
{
const RESOURCE_KEY = 'examples';
const TYPE_KEY = 'example';
const TEMPLATE_TYPE = 'example';

/**
* @var mixed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public function createViewInstance(): ContentProjectionInterface

public function getTemplateType(): string
{
return Example::TYPE_KEY;
return Example::TEMPLATE_TYPE;
}

public function getContentClass(): string
Expand Down
2 changes: 1 addition & 1 deletion Tests/Application/ExampleTestBundle/Entity/ExampleView.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,6 @@ public function setTitle(?string $title): void

public function getTemplateType(): string
{
return Example::TYPE_KEY;
return Example::TEMPLATE_TYPE;
}
}

0 comments on commit 6a58fb9

Please sign in to comment.