Documentation

getDomainId

getDomainId(
)

Method returns domain ID for site page.

Parameters

No parameters

Example

if (\Bitrix\Main\Loader::includeModule('landing'))
{
   \Bitrix\Landing\Landing::setEditMode(true);

   $landing = \Bitrix\Landing\Landing::createInstance(
      1
   );
   if ($landing->exist())
   {
      var_dump($landing->getDomainId());
   }

   foreach ($landing->getError()->getErrors() as $error)
   {
      echo $error->getCode() . ': ';
      echo $error->getMessage();
      echo "\n";
   }
}
© «Bitrix24», 2001-2024
Up