PHP 클래스 NerdsAndCompany\Schematic\Services\Sections

Sync Craft Setups.
저자: Nerds & Company
상속: extends Base
파일 보기 프로젝트 열기: itmundi/schematic

공개 메소드들

메소드 설명
export ( array $sections = [], array $allowedEntryTypeIds = null ) : array Export sections.
import ( array $sectionDefinitions, boolean $force = false ) : Result Attempt to import sections.

비공개 메소드들

메소드 설명
getEntryTypeDefinition ( Craft\EntryTypeModel $entryType ) : array Get entry type definition.
getEntryTypeDefinitions ( array $entryTypes, $allowedEntryTypeIds ) : array Get entry type definitions.
getLocaleDefinition ( Craft\SectionLocaleModel $locale ) : array Get locale definition.
getLocaleDefinitions ( array $locales ) : array Get locale definitions.
getSectionDefinition ( Craft\SectionModel $section, $allowedEntryTypeIds ) : array Get section definition.
importEntryTypes ( Craft\SectionModel $section, array $entryTypeDefinitions, boolean $force )
populateEntryType ( Craft\EntryTypeModel $entryType, array $entryTypeDefinition, string $entryTypeHandle, integer $sectionId ) Populate entry type.
populateSection ( Craft\SectionModel $section, array $sectionDefinition, string $sectionHandle ) Populate section.
populateSectionLocales ( Craft\SectionModel $section, $localeDefinitions ) Populate section locales.
preSaveSection ( Craft\SectionModel $section ) : mixed Save the section manually if it is new to prevent craft from creating the default entry type In case of a single we do want the default entry type and do a normal save Todo: This method is a bit hackish, find a better way.
resetCraftFieldsSectionModelCache ( Craft\SectionModel $section ) Reset craft section model cache using reflection.

메소드 상세

export() 공개 메소드

Export sections.
public export ( array $sections = [], array $allowedEntryTypeIds = null ) : array
$sections array
$allowedEntryTypeIds array
리턴 array

import() 공개 메소드

Attempt to import sections.
public import ( array $sectionDefinitions, boolean $force = false ) : Result
$sectionDefinitions array
$force boolean If set to true sections not included in the import will be deleted
리턴 Result