Get any warnings to show at the top of the edit page.
@return string[] array of strings.
546472
public function get_edit_page_warnings() {
        $warnings = array();

        if (quiz_has_attempts($this->quizobj->get_quizid())) {
            $reviewlink = quiz_attempt_summary_link_to_reports($this->quizobj->get_quiz(),
                    $this->quizobj->get_cm(), $this->quizobj->get_context());
            $warnings[] = get_string('cannoteditafterattempts', 'quiz', $reviewlink);
        }

        return $warnings;
    }
190314
public function getLabels()
    {
        return [
            'name' => $this->plural,
            'singular_name' => $this->singular,
            'add_new' => 'Add New'.' '.$this->singular,
            'add_new_item' => 'Add New'.' '.$this->singular,
            'edit_item' => 'Edit'.' '.$this->singular,
            'new_item' => 'New'.' '.$this->singular,
            'all_items' => 'All'.' '.$this->plural,
            'view_item' => 'View'.' '.$this->singular,
            'search_items' => 'Search'.' '.$this->plural,
            'not_found' => $this->plural.' '.'no found',
            'not_found_in_trash' => $this->plural.' '.'no found in Trash',
            'parent_item_colon' => '',
            'menu_name' => $this->plural,
        ];
    }
866830
protected function getCommonReplacements()
    {
        return [
            '{{sectionBaseName}}' => end($this->sectionSegments),
            '{{studlySectionBaseName}}' => end($this->sectionSegmentsStudly),
            '{{routeBaseAlias}}' => $this->section,
            '{{langBaseKey}}'    => ($this->langDir ? $this->langDir.'/' : '').implode('/', $this->sectionSegments),
            '{{viewBaseName}}'   => ($this->viewsDir ? $this->viewsDir.'.' : '').$this->section,
            '{{modelClass}}'     => $this->modelClass,
        ];
    }
681705
public function getEditData()
    {
        $sort = [];
        if ($this->dataProvider->getSort()->attributes) {
            foreach ($this->dataProvider->getSort()->attributes as $key => $value) {
                $sort[$key] = ArrayHelper::getValue($value, 'label');
            }
        }

        return [
            'callAttributes'   => $this->callAttributes,
            'availableColumns' => $this->getColumnsKeyLabels(),
            'sortAttributes'   => $sort,
        ];
    }
476291
public function getValidatorMessages()
    {
        $messages = [];
        
        foreach ($this->owner->getValidatorRules() as $rule) {
            
            if ($rule->hasMessage()) {
                $messages[$rule->getType()] = $rule->getMessage();
            }
            
        }
        
        return $messages;
    }
1282985
public function getChangesForEditedEntities()
    {
        $edited = [];
        foreach ($this->changes as $change) {
            if ($change instanceof EditedEntity) {
                $edited[] = $change;
            }
        }

        return $edited;
    }
317380
private function _allowedStyles(): array
    {
        $styles = [];
        $plugins = array_flip($this->_getRedactorConfig()['plugins'] ?? []);
        if (isset($plugins['alignment'])) {
            $styles['text-align'] = true;
        }
        if (isset($plugins['fontcolor'])) {
            $styles['color'] = true;
        }
        if (isset($plugins['fontfamily'])) {
            $styles['font-family'] = true;
        }
        if (isset($plugins['fontsize'])) {
            $styles['font-size'] = true;
        }
        return $styles;
    }
13701
protected function getFormattedReplacements()
    {
        $time = $this->getMembers();

        $negative = $this->isNegative();

        return [
            self::HOUR_FORMAT          => sprintf('%02d', $time['hours']),
            self::MINUTE_FORMAT        => sprintf('%02d', $time['minutes']),
            self::SECOND_FORMAT        => sprintf('%02d', $time['seconds']),
            self::TOTAL_MINUTES_FORMAT => sprintf('%02d', $time['total_minutes']),
            self::SIGN_ANY             => $negative ? '-' : '+',
            self::SIGN_NEGATIVE        => $negative ? '-'  : '',
        ];
    }
79782
public function getCMSFields()
    {
        $fields = parent::getCMSFields();
        $fields->addFieldsToTab(
            "Root.Main",
            array(
                TextareaField::create(
                    'Title'
                )->setRows(1),
                HTMLEditorField::create(
                    'Content'
                )
            )
        );

        $this->extend('updateCMSFields', $fields);

        return $fields;
    }
101852
protected function getFlags()
    {
        $ignore = '';
        if (count($this->ignore)) {
            $ignore = ' --ignore=' . implode(',', $this->ignore);
        }

        if (strpos($this->standard, '/') !== false) {
            $standard = ' --standard='.$this->directory.$this->standard;
        } else {
            $standard = ' --standard='.$this->standard;
        }

        $suffixes = '';
        if (count($this->suffixes)) {
            $suffixes = ' --extensions=' . implode(',', $this->suffixes);
        }

        return array($ignore, $standard, $suffixes);
    }
312621
public function getErrorContainerDisplayCss()
    {
        $cssBlocks = [];
        $formConfiguration = $this->getFormObject()->getConfiguration();

        foreach ($formConfiguration->getFields() as $fieldName => $field) {
            $formName = $this->getFormObject()->getName();
            $errorSelector = DataAttributesAssetHandler::getFieldDataMessageKey($fieldName, 'error');
            $warningSelector = DataAttributesAssetHandler::getFieldDataMessageKey($fieldName, 'warning');
            $noticeSelector = DataAttributesAssetHandler::getFieldDataMessageKey($fieldName, 'notice');
            $errorContainerCss = $field->getSettings()->getMessageContainerSelector();

            $cssBlocks[] = <<<CSS
form[name="$formName"]:not([$errorSelector="1"]):not([$warningSelector="1"]):not([$noticeSelector="1"]) $errorContainerCss {
    display: none!important;
}
CSS;
        }

        return implode(CRLF, $cssBlocks);
    }
363891
protected function getTagPatterns()
    {
        return [
            // block tag
            '/^(<([a-z]+)(?:[^>]*)>(?:[^<]*)<\/(?:\2)>)/' => static::MATCH_INDENT_NO,
            // DOCTYPE
            '/^<!([^>]*)>/' => static::MATCH_INDENT_NO,
            // tag with implied closing
            '/^<(' . $this->getUnpairedElements(true) . ')([^>]*)>/' => static::MATCH_INDENT_NO,
            // opening tag
            '/^<[^\/]([^>]*)>/' => static::MATCH_INDENT_INCREASE,
            // closing tag
            '/^<\/([^>]*)>/' => static::MATCH_INDENT_DECREASE,
            // self-closing tag
            '/^<(.+)\/>/' => static::MATCH_INDENT_DECREASE,
            // whitespace
            '/^(\s+)/' => static::MATCH_DISCARD,
            // text node
            '/([^<]+)/' => static::MATCH_INDENT_NO,
        ];
    }
720269
public function getLabel()
    {
        $rootlineTitles = [];
        $rootLine = BackendUtility::BEgetRootLine($this->rootPage['uid']);
        // Remove last
        array_pop($rootLine);
        $rootLine = array_reverse($rootLine);
        foreach ($rootLine as $rootLineItem) {
            $rootlineTitles[] = $rootLineItem['title'];
        }
        return implode(' - ', $rootlineTitles) . ', Root Page ID: ' . $this->rootPage['uid'];
    }
601937
public function getRootPageLanguageIds() : array
    {
        $rootPageLanguageIds = [];
        $rootPageId = $this->getRootPageId();
        $rootPageOverlays = $this->pagesRepository->findTranslationOverlaysByPageId($rootPageId);
        if (count($rootPageOverlays)) {
            foreach ($rootPageOverlays as $rootPageOverlay) {
                $rootPageLanguageIds[] = $rootPageOverlay['sys_language_uid'];
            }
        }
        return $rootPageLanguageIds;
    }
930978
public function getValidationErrors()
    {
        return [
            /** Bundle option related errors */
            __('The options you selected are not available.')->render(),
            __('The required options you selected are not available.')->render(),
            __('Please specify product option(s).')->render(),
            __('Please select all required options.')->render(),
            __('You need to choose options for your item.')->render(),

            /** Input field related errors */
            __('The text is too long.')->render(),
            __('Please specify product\'s required option(s).')
        ];
    }
545782
protected function getPagerArguments()
    {
        return array(
            'total-rows' => $this->getTotalRecords(),
            'total-pages' => $this->getTotalPages(),
            'items-per-page' => $this->getItemsPerPage(),
            'first-shown' => $this->getFirstShown(),
            'last-shown' => $this->getLastShown(),
        );
    }
241624
public static function warnings()
    {
        return [
            'maintenance' => Yii::t('podium/flash', 'Podium is currently in the Maintenance mode. All users without Administrator privileges are redirected to {maintenancePage}. You can switch the mode off at {settingsPage}.', [
                'maintenancePage' => Html::a(Yii::t('podium/flash', 'Maintenance page'), ['forum/maintenance']),
                'settingsPage' => Html::a(Yii::t('podium/flash', 'Settings page'), ['admin/settings']),
            ]),
            'email' => Yii::t('podium/flash', 'No e-mail address has been set for your account! Go to {link} to add one.', [
                'link' => Html::a(Yii::t('podium/view', 'Profile') . ' > ' . Yii::t('podium/view', 'Account Details'), ['profile/details'])
            ]),
            'old_version' => Yii::t('podium/flash', 'It looks like there is a new version of Podium database! {link}', [
                'link' => Html::a(Yii::t('podium/view', 'Update Podium'), ['install/level-up'])
            ]),
            'new_version' => Yii::t('podium/flash', 'Module version appears to be older than database! Please verify your database.')
        ];
    }