3namespace Bitrix\Landing\Assets;
40 $this->resources = [];
60 $this->resources[
$path] = [
61 self::KEY_PATH =>
$path,
62 self::KEY_TYPE =>
$type,
64 self::KEY_ORDER => $this->order++,
70 return array_key_exists(
$path, $this->resources);
84 if ($string && !in_array($string, $this->strings,
true))
86 $this->strings[] = $string;
103 public function remove(
array|
string $pathes): void
105 if (!is_array($pathes))
110 foreach ($pathes as
$path)
120 unset($this->resources[
$path]);
143 $resourcesByFilter =
new self();
145 foreach ($this->resources as $resource)
147 if (array_key_exists($field, $resource) && $resource[$field] === $value)
149 $resourcesByFilter->add(
150 $resource[self::KEY_PATH],
151 $resource[self::KEY_TYPE],
152 $resource[self::KEY_LOCATION]
157 return $resourcesByFilter;
166 return array_keys($this->resources);
176 $normalizedResources = [];
178 foreach ($this->resources as $resource)
180 if (!array_key_exists($resource[self::KEY_TYPE], $normalizedResources))
182 $normalizedResources[$resource[self::KEY_TYPE]] = [];
184 $normalizedResources[$resource[self::KEY_TYPE]][] = $resource[self::KEY_PATH];
187 return $normalizedResources;
192 $columnLocation = array_column($this->resources, self::KEY_LOCATION);
193 $columnOrder = array_column($this->resources, self::KEY_ORDER);
194 array_multisort($columnLocation, $columnOrder, $this->resources);
203 return (
count($this->resources) === 0) && (
count($this->strings) === 0);
addString(string $string)
getSliceByLocation(int $location)
getSliceByFilter($field, $value)
isResourceAdded(string $path)
add(string $path, string $type, int $location)
isNeedRaiseLocation(string $path, int $location)
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
</p ></td >< td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0cm 2.0pt 0cm 2.0pt;height:9.0pt'>< p class=Normal align=center style='margin:0cm;margin-bottom:.0001pt;text-align:center;line-height:normal'>< a name=ТекстовоеПоле54 ></a ><?=($taxRate > count( $arTaxList) > 0) ? $taxRate."%"