Skip to content

Instantly share code, notes, and snippets.

@userlond
userlond / index.php
Created February 12, 2025 10:07
Disable Array Limit plugin for Kint debugger
<?php
\Kint::$plugins = collect(\Kint::$plugins)->filter(function($plugin) {
return $plugin != \Kint\Parser\ArrayLimitPlugin::class;
})->all();
@userlond
userlond / bitrix_find_component_template.php
Created May 6, 2021 05:50
Получить путь к шаблону компонента в Битрикс
$componentName = 'bitrix:menu';
$componentTemplate = 'grey_tabs';
$component = new CBitrixComponent();
$component->InitComponent($componentName, $componentTemplate);
$component->initComponentTemplate();
echo $component->__template->GetFolder();
@userlond
userlond / get_absolute_path_to_class_filename_by_object.php
Last active January 28, 2019 04:38
Get absolute path of class file by its object
<?php
/**
* Get absolute path of class file by its object
* @param $object Object instance
* @return string|null
*/
function get_absolute_path_to_class_filename_by_object($object)
{
$className = get_class($object);
try {
@userlond
userlond / find_relative_path.func.php
Last active February 3, 2016 11:51 — forked from ohaal/find_relative_path.func.php
Find the relative path between two paths
<?php
/**
*
* Find the relative file system path between two file system paths
*
* @param string $frompath Path to start from
* @param string $topath Path we want to end up in
*
* @return string Path leading from $frompath to $topath
*/