Service/CustomFieldsHelper.php
private function _cacheCustomFields($class)
    {
        $customFieldsGroups = $this->em->getRepository('ChillCustomFieldsBundle:CustomFieldsGroup')
            ->findBy(array('entity' => (is_string($class)) ? $class : get_class($class)));
        
        if (!$customFieldsGroups) {
            throw CustomFieldsHelperException::customFieldsGroupNotFound((is_string($class)) ? $class : get_class($class));
        }
        
        foreach ($customFieldsGroup as $cfGroup) {
            $this->_cacheCustomFields($cfGroup);
        }
    }
private function _cacheCustomFields($class)
    {
        $customFieldsGroups = $this->em->getRepository('ChillCustomFieldsBundle:CustomFieldsGroup')
            ->findBy(array('entity' => (is_string($class)) ? $class : get_class($class)));
        
        if (!$customFieldsGroups) {
            throw CustomFieldsHelperException::customFieldsGroupNotFound((is_string($class)) ? $class : get_class($class));
        }
        
        foreach ($customFieldsGroup as $cfGroup) {
            $this->_cacheCustomFields($cfGroup);
        }
    }
private function _cacheCustomFields ( $ class ) { $ customFieldsGroups = $ this -> em -> getRepository ( 'ChillCustomFieldsBundle:CustomFieldsGroup' ) -> findBy ( array ( 'entity' => ( is_string ( $ class ) ) ? $ class : get_class ( $ class ) ) ) ; if ( ! $ customFieldsGroups ) { throw CustomFieldsHelperException :: customFieldsGroupNotFound ( ( is_string ( $ class ) ) ? $ class : get_class ( $ class ) ) ; } foreach ( $ customFieldsGroup as $ cfGroup ) { $ this -> _cacheCustomFields ( $ cfGroup ) ; } }
Set in cache all the custom fields of a given class containing some
custom fields.

@param object|string $class The given class.
@todo check if this fucntions has to call _cacheCustomFieldsGroup instead of
_cacheCustomFields ?
Set in cache all the custom fields of a given class containing some custom fields .