• Модуль: tasks
  • Путь к файлу: ~/bitrix/modules/tasks/lib/ui/component/templatehelper.php
  • Класс: BitrixTasksUIComponentcontains
  • Вызов: contains::addMethod
public function addMethod($name, $cb)
{
	$name = trim((string) $name);
	if($name && is_callable($cb))
	{
		// todo: also, when we move to php 5.4, there closure bindTo() can be done, in case of closure passed
		$this->methods[$name] = $cb;

		if(ToLower(mb_substr($name, 0, 14)) == 'templateaction')
		{
			$this->runtimeActions[$name] = $cb;
		}
	}
}