Свойство | Type | Description | |
---|---|---|---|
$conditionEntityName | |||
$conditionGroupEntityName | |||
$conditionRepository | Sulu\Bundle\ResourceBundle\Entity\ConditionRepositoryInterface | ||
$contextConfiguration | array | ||
$em | Doctrine\ORM\EntityManagerInterface | ||
$filterEntityName | |||
$filterRepository | Sulu\Bundle\ResourceBundle\Entity\FilterRepositoryInterface | ||
$filterTranslationEntityName | |||
$userEntityName | |||
$userRepository | Sulu\Component\Security\Authentication\UserRepositoryInterface |
Méthode | Description | |
---|---|---|
__construct ( Doctrine\ORM\EntityManagerInterface $em, Sulu\Bundle\ResourceBundle\Entity\FilterRepositoryInterface $filterRepo, Sulu\Component\Security\Authentication\UserRepositoryInterface $userRepository, Sulu\Bundle\ResourceBundle\Entity\ConditionRepositoryInterface $conditionRepository, array $contextConfig ) | ||
batchDelete ( array $ids ) | Deletes multiple filters at once. | |
delete ( $id ) | ||
findByIdAndLocale ( $id, $locale ) | ||
findFiltersForUserAndContext ( string $context, $userId, string $locale ) : |
Finds all filters filtered by context and user and for the given locale. | |
getFeaturesForContext ( $context ) : array | null | Returns the configured features for a context. | |
getFieldDescriptors ( $locale ) | ||
getListFieldDescriptors ( $locale ) | ||
hasContext ( $context ) : boolean | Checks if the context exists. | |
isFeatureEnabled ( $context, $feature ) : boolean | Checks if a feature is enabled for a context. | |
save ( array $data, $locale, $userId, $id = null ) |
Méthode | Description | |
---|---|---|
addConditionGroup ( |
Adds a condition group to the given filter. | |
checkData ( array $data, boolean $create ) | Checks if the given data is correct. | |
checkDataSet ( array $data, string $key, boolean $create ) : boolean | Checks if data for the given key is set correctly. | |
getProperty ( array $data, string $key, string $default = null ) : mixed | Returns the entry from the data with the given key, or the given default value, if the key does not exist. | |
getValueForCondition ( $value, $type ) : string | Parses the value for a condition - is mainly used for parsing values with type datetime but excludes relative values like "-1 week" or "now". | |
isValidConditionData ( array $data ) : boolean | Checks if the given data is correct for a condition. | |
removeNonExistentConditions ( |
Removes conditions from condition groups when they are not in the given array. | |
updateConditionGroup ( |
Updates the given condition group with the values from the given array. |
public __construct ( Doctrine\ORM\EntityManagerInterface $em, Sulu\Bundle\ResourceBundle\Entity\FilterRepositoryInterface $filterRepo, Sulu\Component\Security\Authentication\UserRepositoryInterface $userRepository, Sulu\Bundle\ResourceBundle\Entity\ConditionRepositoryInterface $conditionRepository, array $contextConfig ) | ||
$em | Doctrine\ORM\EntityManagerInterface | |
$filterRepo | Sulu\Bundle\ResourceBundle\Entity\FilterRepositoryInterface | |
$userRepository | Sulu\Component\Security\Authentication\UserRepositoryInterface | |
$conditionRepository | Sulu\Bundle\ResourceBundle\Entity\ConditionRepositoryInterface | |
$contextConfig | array |
protected addConditionGroup ( |
||
$filter | The filter to add the condition group to | |
$conditionGroupData | array | The array containing the data for the additional condition group |
Résultat | boolean |
public batchDelete ( array $ids ) | ||
$ids | array |
public findFiltersForUserAndContext ( string $context, $userId, string $locale ) : |
||
$context | string | |
$userId | ||
$locale | string | |
Résultat |
public getFeaturesForContext ( $context ) : array | null | ||
$context | ||
Résultat | array | null |
protected getValueForCondition ( $value, $type ) : string | ||
Résultat | string |
public hasContext ( $context ) : boolean | ||
$context | ||
Résultat | boolean |
public isFeatureEnabled ( $context, $feature ) : boolean | ||
$context | ||
$feature | ||
Résultat | boolean |
protected isValidConditionData ( array $data ) : boolean | ||
$data | array | The data to check |
Résultat | boolean |
protected removeNonExistentConditions ( |
||
$conditionGroup | ||
$conditionIds | array |
protected updateConditionGroup ( |
||
$conditionGroup | ||
$matchedEntry | array | |
Résultat | boolean |
protected static $conditionGroupEntityName |
protected ConditionRepositoryInterface,Sulu\Bundle\ResourceBundle\Entity $conditionRepository | ||
Résultat | Sulu\Bundle\ResourceBundle\Entity\ConditionRepositoryInterface |
protected EntityManagerInterface,Doctrine\ORM $em | ||
Résultat | Doctrine\ORM\EntityManagerInterface |
protected FilterRepositoryInterface,Sulu\Bundle\ResourceBundle\Entity $filterRepository | ||
Résultat | Sulu\Bundle\ResourceBundle\Entity\FilterRepositoryInterface |
protected static $filterTranslationEntityName |