cms路径

@return string
962112
public function getCmsPath()
    {
        if ($this->composer->getPackage()) {
            $extra = $this->composer->getPackage()->getExtra();
            if (! empty($extra['cms-path'])) {
                return $extra['cms-path'];
            }
        }
        
        return 'thinkcms';
    }
849530
public function getSubDomain()
    {
        // 获取当前主域名
        $rootDomain = $this->config['app.url_domain'];

        if ($rootDomain) {
            // 配置域名根 例如 thinkphp.cn 163.com.cn 如果是国家级域名 com.cn net.cn 之类的域名需要配置
            $domain = explode('.', rtrim(stristr($this->host, $rootDomain, true), '.'));
        } else {
            $domain = explode('.', $this->host, -2);
        }

        $this->subDomain = implode('.', $domain);

        return $this->subDomain;
    }
1178190
public function getCMSFields() {
		preg_match("/<body[^>]*>(.*?)<\/body>/is", $this->Body, $matches);
		$contents = $matches ? $matches[1] : "";

		$f = FieldList::create(
			ReadonlyField::create('To'),
			ReadonlyField::create('Subject'),
			ReadonlyField::create('BCC'),
			ReadonlyField::create('CC'),
			HeaderField::create('Email contents', 5),
			LiteralField::create('BodyContents', "<div class='field'>{$contents}</div>")
		);

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

		return $f;
	}
959802
protected function findModel(): CmsModel
    {
        if (($model = CmsModel::findOne($this->pageId)) !== null) {
            return $model;
        }

        throw new NotFoundHttpException(Yii::t('yii2mod.cms', 'The requested page does not exist.'));
    }
649823
public function form()
    {
        return Menu::form(function (Form $form) {
            $form->display('id', 'ID');

            $form->select('parent_id', trans('admin.parent_id'))->options(Menu::selectOptions());
            $form->text('title', trans('admin.title'))->rules('required');
            $form->icon('icon', trans('admin.icon'))->default('fa-bars')->help($this->iconHelp());
            $form->text('uri', trans('admin.uri'));
            $form->multipleSelect('roles', trans('admin.roles'))->options(Role::all()->pluck('name', 'id'));
            $form->radio('blank', '加载方式')->options(['0' => 'pjax', '1'=>'no-pjax' ])->default('0');
            $form->display('created_at', trans('admin.created_at'));
            $form->display('updated_at', trans('admin.updated_at'));
        });
    }
1037848
public function getContentAsArray()
    {
        //$nav_item_page = (new \yii\db\Query())->select('*')->from('cms_nav_item_page t1')->leftJoin('cms_layout', 'cms_layout.id=t1.layout_id')->where(['t1.id' => $this->id])->one();
        $nav_item_page = $this;
        
        if (!$nav_item_page->layout) {
            return [];
        }
        
        $return = [
            'nav_item_page' => ['id' => $nav_item_page->id, 'layout_id' => $nav_item_page->layout_id, 'layout_name' => $nav_item_page->layout->name],
            '__placeholders' => [],
        ];
        
        $config = json_decode($nav_item_page->layout->json_config, true);
        
        if (isset($config['placeholders'])) {
            foreach ($config['placeholders'] as $rowKey => $row) {
                foreach ($row as $placeholderKey => $placeholder) {
                    $placeholder['nav_item_page_id'] = $this->id;
                    $placeholder['prev_id'] = 0;
                    $placeholder['__nav_item_page_block_items'] = [];
                    if (!isset($placeholder['cols'])) {
                        $placeholder['cols'] = '12';
                    }
                    
                    $return['__placeholders'][$rowKey][$placeholderKey] = $placeholder;
                    
                    $placeholderVar = $placeholder['var'];
                    
                    $return['__placeholders'][$rowKey][$placeholderKey]['__nav_item_page_block_items'] = self::getPlaceholder($placeholderVar, 0, $this);
                }
            }
        }
        
        return $return;
    }
1338697
public function getContent() {
        $cmd = Factory::config('php_path', 'php').' -dvld.active=1 '.$this->srcFile;  // 替换为你要执行的shell脚本
        $process = Process::factory($cmd);
        $status = $process->start()->join()->stop();
        extract($process->getOutput());
        return $stderr;
    }
753459
public function getCMSPageFields()
    {
        $fields = parent::getCMSPageFields();
        $fields->removeByName('Title');
        $fields->addFields(
            array(
                HtmlEditorField::create(
                    'Content',
                    _t('MainBlock.CONTENT', 'Content')
                )
            )
        );
        $this->extend('updateCMSPageFields', $fields);
        return $fields;
    }
111417
public function getCMSFields() {
		$fields = parent::getCMSFields();

		$modes = array(
			''		=> 'No filing',
			'day'	=> '/Year/Month/Day',
			'month'	=> '/Year/Month',
			'year'	=> '/Year'
		);
		$fields->addFieldToTab('Root.Main', new DropdownField('FilingMode', _t('NewsHolder.FILING_MODE', 'File into'), $modes), 'Content');
		$fields->addFieldToTab('Root.Main', new DropdownField('FileBy', _t('NewsHolder.FILE_BY', 'File by'), array('Published' => 'Published', 'Created' => 'Created')), 'Content');
		$fields->addFieldToTab('Root.Main', new CheckboxField('PrimaryNewsSection', _t('NewsHolder.PRIMARY_SECTION', 'Is this a primary news section?'), true), 'Content');

		$fields->addFieldToTab('Root.Main', new DropdownField('OrderBy', _t('NewsHolder.ORDER_BY', 'Order by'), array('OriginalPublishedDate' => 'Published', 'Created' => 'Created')), 'Content');
		$fields->addFieldToTab('Root.Main', new DropdownField('OrderDir', _t('NewsHolder.ORDER_DIR', 'Order direction'), array('DESC' => 'Descending date', 'ASC' => 'Ascending date')), 'Content');
		
		$this->extend('updateNewsHolderCMSFields', $fields);

		return $fields;
	}
955915
public function CMSThumbnail()
    {
        $width = (int)Config::inst()->get(__CLASS__, 'cms_thumbnail_width');
        $height = (int)Config::inst()->get(__CLASS__, 'cms_thumbnail_height');
        return $this->ThumbnailIcon($width, $height);
    }
693545
public function actionWebsite()
    {
        $model = new SettingWebsiteForm();
        if (yii::$app->getRequest()->getIsPost()) {
            if ($model->load(yii::$app->getRequest()->post()) && $model->validate() && $model->setWebsiteConfig()) {
                yii::$app->getSession()->setFlash('success', yii::t('cms', 'Success'));
            } else {
                $errors = $model->getErrors();
                $err = '';
                foreach ($errors as $v) {
                    $err .= $v[0] . '<br>';
                }
                yii::$app->getSession()->setFlash('error', $err);
            }
        }

        $model->getWebsiteSetting();
        return $this->render('website', [
            'model' => $model
        ]);

    }
1267628
public function index()
    {
        $searcher = Search::build(function (Searcher $searcher) {
            $searcher->like('user.name', 'name');
            $searcher->equal('method');
            $searcher->equal('ip');
        });

        $logs = (new OperationLog())->search($searcher)->orderBy('id', 'desc')->paginate(10);
        $header = '操作日志';
        $description = '列表';
        return view('admin::system.logs', compact('logs', 'header', 'description'));
    }
667253
public function getCMSFields()
    {
        $this->beforeUpdateCMSFields(function ($fields) {
            /** @var FieldList $fields */
            $fields->removeByName([
                'Sort',
                'AccordionID',
            ]);

            $fields->dataFieldByName('Image')
                ->setFolderName('Uploads/Elements/Accordions');
        });

        return parent::getCMSFields();
    }
1183462
public function display()
    {
        if ($this->label_translated) {
            return cms_trans($this->label_translated);
        }

        if ($this->label) {
            return $this->label;
        }

        return snake_case($this->method, ' ');
    }
200066
public function get_content_plain() {
		return wc_get_template_html( $this->template_plain, [
			'order'         => $this->object,
			'email_heading' => $this->get_heading(),
			'sent_to_admin' => false,
			'plain_text'    => true,
			'email'			=> $this,
		] );
	}
885345
public function getTable()
    {
        if (isset($this->table)) {
            return $this->table;
        }

        $moduleNumber = $this->getModuleNumber();

        $baseName = str_replace('\\', '', Str::snake(Str::plural(class_basename($this))));

        // if it is a translated table, convert to CMS convention
        $translationExtension = '_' . str_plural(strtolower(config('translatable.translation_suffix', 'translation')));

        if (ends_with($baseName, $translationExtension)) {
            $baseName = str_plural(substr($baseName, 0, -1 * strlen($translationExtension)))
                      . config('pxlcms.translatable.translation_table_postfix');
        }

        return config('pxlcms.tables.prefix')
            . ($moduleNumber ? 'm' . $moduleNumber . '_' : '')
            . $baseName;
    }
129750
public function getCMSFields()
    {
        $this->beforeUpdateCMSFields(function (FieldList $fields) {
            $fields
                ->fieldByName('Root.Main.HTML')
                ->setTitle(_t(__CLASS__ . '.ContentLabel', 'Content'));
        });
        return parent::getCMSFields();
    }