Skip to content

[Form] Added getBlockPrefix() to ResolvedFormTypeInterface #16749

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 29, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[Form] Added getBlockPrefix() to ResolvedFormTypeInterface
  • Loading branch information
webmozart committed Nov 29, 2015
commit 7e89345a0d6d5e13467797c0180d8963512d8b09
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,12 @@ public function __construct(ResolvedFormTypeInterface $proxiedType, FormDataColl
$this->dataCollector = $dataCollector;
}

/**
* {@inheritdoc}
*/
public function getName()
{
return $this->proxiedType->getName();
}

/**
* {@inheritdoc}
*/
public function getBlockPrefix()
{
return method_exists($this->proxiedType, 'getBlockPrefix') ? $this->proxiedType->getBlockPrefix() : $this->getName();
return $this->proxiedType->getBlockPrefix();
}

/**
Expand Down
4 changes: 1 addition & 3 deletions src/Symfony/Component/Form/ResolvedFormType.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,7 @@ public function __construct(FormTypeInterface $innerType, array $typeExtensions
}

/**
* Returns the prefix of the template block name for this type.
*
* @return string The prefix of the template block name
* {@inheritdoc}
*/
public function getBlockPrefix()
{
Expand Down
7 changes: 7 additions & 0 deletions src/Symfony/Component/Form/ResolvedFormTypeInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@
*/
interface ResolvedFormTypeInterface
{
/**
* Returns the prefix of the template block name for this type.
*
* @return string The prefix of the template block name
*/
public function getBlockPrefix();

/**
* Returns the parent type.
*
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy