Contao\PageModel::onRegister PHP Method

onRegister() public method

Register the contao.dns-fallback alias when the model is attached to the registry
public onRegister ( Registry $registry )
$registry Contao\Model\Registry The model registry
    public function onRegister(Model\Registry $registry)
    {
        parent::onRegister($registry);
        // Register this model as being the fallback page for a given dns
        if ($this->fallback && $this->type == 'root' && !$registry->isRegisteredAlias($this, 'contao.dns-fallback', $this->dns)) {
            $registry->registerAlias($this, 'contao.dns-fallback', $this->dns);
        }
    }