PHP Класс Sulu\Bundle\ResourceBundle\Resource\FilterManager

Наследование: implements Sulu\Bundle\ResourceBundle\Resource\FilterManagerInterface, use trait Sulu\Component\Persistence\RelationTrait
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$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

Открытые методы

Метод Описание
__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 ) : Filter[] 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 )

Защищенные методы

Метод Описание
addConditionGroup ( Filter $filter, array $conditionGroupData ) : boolean 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 ( ConditionGroup $conditionGroup, array $conditionIds ) Removes conditions from condition groups when they are not in the given array.
updateConditionGroup ( ConditionGroup $conditionGroup, array $matchedEntry ) : boolean Updates the given condition group with the values from the given array.

Описание методов

__construct() публичный Метод

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

addConditionGroup() защищенный Метод

Adds a condition group to the given filter.
protected addConditionGroup ( Filter $filter, array $conditionGroupData ) : boolean
$filter Sulu\Bundle\ResourceBundle\Api\Filter The filter to add the condition group to
$conditionGroupData array The array containing the data for the additional condition group
Результат boolean

batchDelete() публичный Метод

Deletes multiple filters at once.
public batchDelete ( array $ids )
$ids array

checkData() защищенный Метод

Checks if the given data is correct.
protected checkData ( array $data, boolean $create )
$data array The data to check
$create boolean Defines if check is for new or already existing data

checkDataSet() защищенный Метод

Checks if data for the given key is set correctly.
protected checkDataSet ( array $data, string $key, boolean $create ) : boolean
$data array The array with the data
$key string The array key to check
$create boolean Defines if the is for new or already existing data
Результат boolean

delete() публичный Метод

public delete ( $id )

findByIdAndLocale() публичный Метод

public findByIdAndLocale ( $id, $locale )

findFiltersForUserAndContext() публичный Метод

Finds all filters filtered by context and user and for the given locale.
public findFiltersForUserAndContext ( string $context, $userId, string $locale ) : Filter[]
$context string
$userId
$locale string
Результат Sulu\Bundle\ResourceBundle\Api\Filter[]

getFeaturesForContext() публичный Метод

Returns the configured features for a context.
public getFeaturesForContext ( $context ) : array | null
$context
Результат array | null

getFieldDescriptors() публичный Метод

public getFieldDescriptors ( $locale )

getListFieldDescriptors() публичный Метод

public getListFieldDescriptors ( $locale )

getProperty() защищенный Метод

Returns the entry from the data with the given key, or the given default value, if the key does not exist.
protected getProperty ( array $data, string $key, string $default = null ) : mixed
$data array
$key string
$default string
Результат mixed

getValueForCondition() защищенный Метод

Parses the value for a condition - is mainly used for parsing values with type datetime but excludes relative values like "-1 week" or "now".
protected getValueForCondition ( $value, $type ) : string
Результат string

hasContext() публичный Метод

Checks if the context exists.
public hasContext ( $context ) : boolean
$context
Результат boolean

isFeatureEnabled() публичный Метод

Checks if a feature is enabled for a context.
public isFeatureEnabled ( $context, $feature ) : boolean
$context
$feature
Результат boolean

isValidConditionData() защищенный Метод

Checks if the given data is correct for a condition.
protected isValidConditionData ( array $data ) : boolean
$data array The data to check
Результат boolean

removeNonExistentConditions() защищенный Метод

Removes conditions from condition groups when they are not in the given array.
protected removeNonExistentConditions ( ConditionGroup $conditionGroup, array $conditionIds )
$conditionGroup Sulu\Bundle\ResourceBundle\Entity\ConditionGroup
$conditionIds array

save() публичный Метод

public save ( array $data, $locale, $userId, $id = null )
$data array

updateConditionGroup() защищенный Метод

Updates the given condition group with the values from the given array.
protected updateConditionGroup ( ConditionGroup $conditionGroup, array $matchedEntry ) : boolean
$conditionGroup Sulu\Bundle\ResourceBundle\Entity\ConditionGroup
$matchedEntry array
Результат boolean

Описание свойств

$conditionEntityName защищенное статическое свойство

protected static $conditionEntityName

$conditionGroupEntityName защищенное статическое свойство

protected static $conditionGroupEntityName

$conditionRepository защищенное свойство

protected ConditionRepositoryInterface,Sulu\Bundle\ResourceBundle\Entity $conditionRepository
Результат Sulu\Bundle\ResourceBundle\Entity\ConditionRepositoryInterface

$contextConfiguration защищенное свойство

protected array $contextConfiguration
Результат array

$em защищенное свойство

protected EntityManagerInterface,Doctrine\ORM $em
Результат Doctrine\ORM\EntityManagerInterface

$filterEntityName защищенное статическое свойство

protected static $filterEntityName

$filterRepository защищенное свойство

protected FilterRepositoryInterface,Sulu\Bundle\ResourceBundle\Entity $filterRepository
Результат Sulu\Bundle\ResourceBundle\Entity\FilterRepositoryInterface

$filterTranslationEntityName защищенное статическое свойство

protected static $filterTranslationEntityName

$userEntityName защищенное статическое свойство

protected static $userEntityName

$userRepository защищенное свойство

protected UserRepositoryInterface,Sulu\Component\Security\Authentication $userRepository
Результат Sulu\Component\Security\Authentication\UserRepositoryInterface