{% for link in item.links %}
{% if link[item.language_id].name != '' %}
{% if link.category_link is defined and link.category_link != '' %}
<li><a href="{{ link.category_link }}">{{ link[item.language_id].name }}</a></li>
{% else %}
<li><a href="{{ link[item.language_id].link }}">{{ link[item.language_id].name }}</a></li>
{% endif %}
{% endif %}
{% endfor %}
array(1) {
["top"] => array(1) {
["top"] => array(1) {
[0] => array(11) {
["name_on_links"] => string(8)
"ссылки" ["item_id"] => string(1)
"8" ["category_id"] => string(2)
"59" ["view"] => string(1)
"1" ["title"] => string(1)
"0" ["items_count"] => string(1)
"5" ["name"] => string(8)
"тест" ["links"] => array(1) {
[0] => array(2) {
[1] => array(2) {
["name"] => string(8)
"тест" ["link"] => string(0)
""
} ["category"] => string(2)
"59"
}
} ["sort"] => string(1)
"0" ["language_id"] => int(1)["category_link"] => string(38)
"https://site.ru/category"
}
}
}
}
public static function getCandidates($type)
{
$returnData = [];
$bindings = self::getPuliDiscovery()->findBindings($type);
foreach ($bindings as $binding) {
$condition = true;
if ($binding->hasParameterValue('depends')) {
$condition = $binding->getParameterValue('depends');
}
$returnData[] = ['class' => $binding->getClassName(), 'condition' => $condition];
}
return $returnData;
}
protected static function evaluateCondition($condition)
{
if (is_string($condition)) {
// Should be extended for functions, extensions???
return self::safeClassExists($condition);
}
if (is_callable($condition)) {
return (bool) $condition();
}
if (is_bool($condition)) {
return $condition;
}
if (is_array($condition)) {
foreach ($condition as $c) {
if (false === static::evaluateCondition($c)) {
return false;
}
}
return true;
}
return false;
}
const swiper2 = new Swiper(".teamSwiper", {
loop: true,
slidesPerView: 3,
spaceBetween: 10,
autoplay: false,
allowTouchMove: false,
noSwiping: false,
direction: "vertical",
breakpoints: {
640: {
slidesPerView: 3,
spaceBetween: 10,
allowTouchMove: false,
autoplay:false
},
768: {
slidesPerView: 2,
spaceBetween: 10,
},
1024: {
slidesPerView: 2,
spaceBetween: 10,
allowTouchMove: true,
autoplay: {
delay: 3500,
},
},
},
pagination: {
el: ".swiper-pagination",
clickable: true,
},
navigation: {
nextEl: '.swiper-button-next-team',
prevEl: '.swiper-button-prev-team',
},
});