55 parent::add($identifier, $asset);
57 $this->getGroupFor(
$properties)->add($identifier, $asset);
68 parent::insert($identifier, $asset, $key);
70 $this->getGroupFor(
$properties)->insert($identifier, $asset, $key);
96 foreach ($this->groups as $existingGroup) {
97 if ($existingGroup->getProperties() ==
$properties) {
98 return $existingGroup;
102 $newGroup = $this->propertyFactory->create([
'properties' =>
$properties]);
103 $this->groups[] = $newGroup;
113 public function remove($identifier)
115 parent::remove($identifier);
117 foreach ($this->groups as
$group) {
118 if (
$group->has($identifier)) {
119 $group->remove($identifier);
143 foreach ($this->groups as
$group) {
144 if (
$group->getProperty(self::PROPERTY_CONTENT_TYPE) == $contentType) {
add($identifier, AssetInterface $asset, array $properties=[])
const PROPERTY_CONTENT_TYPE
getFilteredProperties(AssetInterface $asset, $properties=[])
__construct(PropertyGroupFactory $propertyFactory)
getGroupByContentType($contentType)
insert($identifier, AssetInterface $asset, $key)