1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
Класс ResourceCollection

Открытые члены

 __construct ()
 add (string $path, string $type, int $location)
 addString (string $string)
 getStrings ()
 remove (array|string $pathes)
 getSliceByLocation (int $location)
 getPathes ()
 getNormalized ()
 isEmpty ()

Защищенные члены

 isResourceAdded (string $path)
 isNeedRaiseLocation (string $path, int $location)
 removeOnce (string $path)
 getSliceByFilter ($field, $value)
 sortByLocation ()

Защищенные данные

const KEY_PATH = 'path'
const KEY_TYPE = 'type'
const KEY_LOCATION = 'location'
const KEY_ORDER = 'order'
array $resources
int $order
array $strings = []

Подробное описание

См. определение в файле resourcecollection.php строка 12

Конструктор(ы)

◆ __construct()

__construct ( )

ResourceCollection constructor.

См. определение в файле resourcecollection.php строка 38

Методы

◆ add()

add ( string $path,
string $type,
int $location )
Аргументы
string$path
string$type
int$location

См. определение в файле resourcecollection.php строка 49

◆ addString()

addString ( string $string)

Save asset string in collection (like a <script> or <link>)

Аргументы
string$string

См. определение в файле resourcecollection.php строка 82

◆ getNormalized()

getNormalized ( )

Sort by location and group by types

Возвращает
array

См. определение в файле resourcecollection.php строка 173

◆ getPathes()

getPathes ( )

Return pathes of added resources

Возвращает
array

См. определение в файле resourcecollection.php строка 164

◆ getSliceByFilter()

getSliceByFilter ( $field,
$value )
protected

Create new ResourceCollection object by filter

Аргументы
$field- field name
$value- value of field
Возвращает
ResourceCollection

См. определение в файле resourcecollection.php строка 141

◆ getSliceByLocation()

getSliceByLocation ( int $location)

Create new ResourceCollection object by location

Аргументы
int$location
Возвращает
ResourceCollection

См. определение в файле resourcecollection.php строка 129

◆ getStrings()

getStrings ( )

Return added strings

Возвращает
array of strings

См. определение в файле resourcecollection.php строка 94

◆ isEmpty()

isEmpty ( )

Return true is no added resources and no added strings

Возвращает
bool

См. определение в файле resourcecollection.php строка 201

◆ isNeedRaiseLocation()

isNeedRaiseLocation ( string $path,
int $location )
protected

См. определение в файле resourcecollection.php строка 73

◆ isResourceAdded()

isResourceAdded ( string $path)
protected

См. определение в файле resourcecollection.php строка 68

◆ remove()

remove ( array|string $pathes)
Аргументы
array | string$pathes- string or array of strings pathes to asset to delete from collection
Возвращает
void

См. определение в файле resourcecollection.php строка 103

◆ removeOnce()

removeOnce ( string $path)
protected

См. определение в файле resourcecollection.php строка 116

◆ sortByLocation()

sortByLocation ( )
protected

См. определение в файле resourcecollection.php строка 190

Поля

◆ $order

int $order
protected

См. определение в файле resourcecollection.php строка 28

◆ $resources

array $resources
protected

См. определение в файле resourcecollection.php строка 23

◆ $strings

array $strings = []
protected

См. определение в файле resourcecollection.php строка 33

◆ KEY_LOCATION

const KEY_LOCATION = 'location'
protected

См. определение в файле resourcecollection.php строка 16

◆ KEY_ORDER

const KEY_ORDER = 'order'
protected

См. определение в файле resourcecollection.php строка 17

◆ KEY_PATH

const KEY_PATH = 'path'
protected

См. определение в файле resourcecollection.php строка 14

◆ KEY_TYPE

const KEY_TYPE = 'type'
protected

См. определение в файле resourcecollection.php строка 15


Объявления и описания членов класса находятся в файле: