• Модуль: mobileapp
  • Путь к файлу: ~/bitrix/modules/mobileapp/lib/janative/entity/base.php
  • Класс: BitrixMobileAppJanativeEntityBase
  • Вызов: Base::getModificationMarker
public function getModificationMarker()
{
	if (defined("JN_DEV_RELOAD")) {
		return "1.0";
	}
	if (!empty(static::$modificationDates[$this->name]))
	{
		return static::$modificationDates[$this->name];
	}

	$file = new File("{$this->path}/{$this->baseFileName}.js");
	$marks = [Utils::getFileHash($file)];
	$langDirectory = new Directory("{$this->path}/lang/");
	if ($langDirectory->isExists())
	{
		$langs = $langDirectory->getChildren();
		foreach ($langs as $lang)
		{
			if ($lang->isDirectory())
			{
				$langFile = new File($lang->getPath()."/{$this->baseFileName}.php");
				$marks[] = Utils::getFileHash($langFile);
			}
		}
	}

	$this->onBeforeModificationMarkerSave($marks);
	if (count($marks) == 1)
	{
		$value = $marks[0];
	}
	else
	{
		$value = md5(implode("/", $marks));
	}

	static::$modificationDates[$this->name] = $value;

	return $value;
}