• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/orm/entity.php
  • Класс: BitrixMainORMEntity
  • Вызов: Entity::getCode
public function getCode()
{
	if ($this->code === null)
	{
		$this->code = '';

		// get absolute path to class
		$class_path = explode('\', strtoupper(ltrim($this->className, '\')));

		// cut class name to leave namespace only
		$class_path = array_slice($class_path, 0, -1);

		// cut Bitrix namespace
		if (count($class_path) && $class_path[0] === 'BITRIX')
		{
			$class_path = array_slice($class_path, 1);
		}

		// glue module name
		if (!empty($class_path))
		{
			$this->code = join('_', $class_path).'_';
		}

		// glue entity name
		$this->code .= strtoupper(StringHelper::camel2snake($this->getName()));
	}

	return $this->code;
}