Simplifiying Helper and twig functions

Now, the CustomFieldsHelper methods and the twig function which render customFields require always a `Chill\CustomFields\Entity\CustomField`.

The possibility to add a slug and an object as argument to those method is abandoned, and was not used in other bundle (nevertheless, the method to catch a customField from his slug was buggy).
This commit is contained in:
2015-12-28 00:38:27 +01:00
parent 89221599d4
commit d2039893b3
4 changed files with 102 additions and 98 deletions

View File

@@ -26,11 +26,11 @@ class CustomFieldsHelperException extends \Exception
{
public static function customFieldsGroupNotFound($entity)
{
return new CustomFieldsRenderingException("The customFieldsGroups associated with $entity are not found");
return new CustomFieldsHelperException("The customFieldsGroups associated with $entity are not found");
}
public static function slugIsMissing()
{
return new CustomFieldsRenderingException("The slug is missing");
return new CustomFieldsHelperException("The slug is missing");
}
}