-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add consistency in FieldDescriptionRegistryInterface and implementation
- Loading branch information
1 parent
8866eb0
commit 3053f2b
Showing
5 changed files
with
137 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,15 @@ | |
* Implementations should provide arrays of FieldDescriptionInterface instances. | ||
* | ||
* @author Thomas Rabaix <[email protected]> | ||
* | ||
* @method bool hasFormFieldDescription($name) | ||
* @method void addFormFieldDescription($name, FieldDescriptionInterface $fieldDescription) | ||
* @method void removeFormFieldDescription($name) | ||
* @method FieldDescriptionInterface getShowFieldDescription($name) | ||
* @method FieldDescriptionInterface[] getShowFieldDescriptions() | ||
* @method bool hasListFieldDescription() | ||
* @method FieldDescriptionInterface getListFieldDescription($name) | ||
* @method FieldDescriptionInterface[] getListFieldDescriptions() | ||
*/ | ||
interface FieldDescriptionRegistryInterface | ||
{ | ||
|
@@ -29,13 +38,25 @@ interface FieldDescriptionRegistryInterface | |
*/ | ||
public function getFormFieldDescription($name); | ||
|
||
// NEXT_MAJOR: Uncomment the following line. | ||
//public function hasFormFieldDescription(string $name): bool; | ||
|
||
// NEXT_MAJOR: Uncomment the following line. | ||
//public function addFormFieldDescription(string $name, FieldDescriptionInterface $fieldDescription): void; | ||
|
||
// NEXT_MAJOR: Uncomment the following line. | ||
//public function removeFormFieldDescription(string $name): void; | ||
|
||
/** | ||
* Build and return the collection of form FieldDescription. | ||
* | ||
* @return FieldDescriptionInterface[] collection of form FieldDescription | ||
*/ | ||
public function getFormFieldDescriptions(); | ||
|
||
// NEXT_MAJOR: Uncomment the following line. | ||
//public function getShowFieldDescription(string $name): FieldDescriptionInterface; | ||
|
||
/** | ||
* Returns true if the admin has a FieldDescription with the given $name. | ||
* | ||
|
@@ -59,6 +80,15 @@ public function addShowFieldDescription($name, FieldDescriptionInterface $fieldD | |
*/ | ||
public function removeShowFieldDescription($name); | ||
|
||
// NEXT_MAJOR: Uncomment the following line. | ||
//public function getShowFieldDescriptions(): array; | ||
|
||
// NEXT_MAJOR: Uncomment the following line. | ||
//public function hasListFieldDescription(string $name): bool; | ||
|
||
// NEXT_MAJOR: Uncomment the following line. | ||
//public function getListFieldDescription(string $name): FieldDescriptionInterface; | ||
|
||
/** | ||
* Adds a list FieldDescription. | ||
* | ||
|
@@ -73,13 +103,25 @@ public function addListFieldDescription($name, FieldDescriptionInterface $fieldD | |
*/ | ||
public function removeListFieldDescription($name); | ||
|
||
// NEXT_MAJOR: Uncomment the following line. | ||
//public function getListFieldDescriptions(): array; | ||
|
||
/** | ||
* Returns a list depend on the given $object. | ||
* | ||
* @return FieldDescriptionCollection | ||
*/ | ||
public function getList(); | ||
|
||
/** | ||
* Returns a filter FieldDescription. | ||
* | ||
* @param string $name | ||
* | ||
* @return FieldDescriptionInterface|null // NEXT_MAJOR: Remove the null return type | ||
*/ | ||
public function getFilterFieldDescription($name); | ||
|
||
/** | ||
* Returns true if the filter FieldDescription exists. | ||
* | ||
|
@@ -109,13 +151,4 @@ public function removeFilterFieldDescription($name); | |
* @return FieldDescriptionInterface[] | ||
*/ | ||
public function getFilterFieldDescriptions(); | ||
|
||
/** | ||
* Returns a filter FieldDescription. | ||
* | ||
* @param string $name | ||
* | ||
* @return FieldDescriptionInterface|null | ||
*/ | ||
public function getFilterFieldDescription($name); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters