src/Contao/View/Contao2BackendView/EditMask.php
protected function getHeadline()
    {
        $definitionName = $this->getDataDefinition()->getName();
        $translator     = $this->getEnvironment()->getTranslator();

        if ($this->model->getId()) {
            $headline = $translator->translate('editRecord', $definitionName, [$this->model->getId()]);

            if ('editRecord' !== $headline) {
                return $headline;
            }
            return $translator->translate('MSC.editRecord', null, [$this->model->getId()]);
        }

        $headline = $translator->translate('newRecord', $definitionName, [$this->model->getId()]);
        if ('newRecord' !== $headline) {
            return $headline;
        }

        return $translator->translate('MSC.editRecord', null, ['']);
    }
protected function getHeadline()
    {
        $definitionName = $this->getDataDefinition()->getName();
        $translator     = $this->getEnvironment()->getTranslator();

        if ($this->model->getId()) {
            $headline = $translator->translate('editRecord', $definitionName, [$this->model->getId()]);

            if ('editRecord' !== $headline) {
                return $headline;
            }
            return $translator->translate('MSC.editRecord', null, [$this->model->getId()]);
        }

        $headline = $translator->translate('newRecord', $definitionName, [$this->model->getId()]);
        if ('newRecord' !== $headline) {
            return $headline;
        }

        return $translator->translate('MSC.editRecord', null, ['']);
    }
protected function getHeadline ( ) { $ definitionName = $ this -> getDataDefinition ( ) -> getName ( ) ; $ translator = $ this -> getEnvironment ( ) -> getTranslator ( ) ; if ( $ this -> model -> getId ( ) ) { $ headline = $ translator -> translate ( 'editRecord' , $ definitionName , [ $ this -> model -> getId ( ) ] ) ; if ( 'editRecord' !== $ headline ) { return $ headline ; } return $ translator -> translate ( 'MSC.editRecord' , null , [ $ this -> model -> getId ( ) ] ) ; } $ headline = $ translator -> translate ( 'newRecord' , $ definitionName , [ $ this -> model -> getId ( ) ] ) ; if ( 'newRecord' !== $ headline ) { return $ headline ; } return $ translator -> translate ( 'MSC.editRecord' , null , [ '' ] ) ; }
Determine the headline to use.

@return string.
Determine the headline to use .