PHP 클래스 Pimcore\Model\Element\Service

상속: extends Pimcore\Model\AbstractModel
파일 보기 프로젝트 열기: pimcore/pimcore 1 사용 예제들

공개 메소드들

메소드 설명
addTreeFilterJoins ( $cv, $childsList ) Changes the query according to the custom view config
cleanupBrokenViews ( ) clean up broken views which were generated by localized fields, .
correctPath ( string $path ) : string
createFolderByPath ( $path, array $options = [] ) : Folder | Folder | Folder
findForbiddenPaths ( string $type, $user ) : array find all elements which the user may not list and therefore may never be shown to the user
fixAllowedTypes ( $data, $type )
getCustomViewById ( $id )
getDependedElement ( array $config ) : AbstractObject | Document | Asset
getDependencyForFrontend ( Document | Asset | AbstractObject $element ) : array
getElementById ( string $type, integer $id ) : Pimcore\Model\Element\ElementInterface
getElementByPath ( string $type, string $path ) : Pimcore\Model\Element\ElementInterface
getElementType ( Pimcore\Model\Element\ElementInterface $element ) : string
getFilename ( Pimcore\Model\Element\ElementInterface $element ) : string
getIdList ( $list, $idGetter = 'getId' ) : array
getIdPath ( $element ) : string
getRequiredByDependenciesForFrontend ( Dependency $d ) : array
getRequiresDependenciesForFrontend ( Dependency $d ) : array
getSafeVersionInfo ( $versions )
getSaveCopyName ( string $type, string $sourceKey, Pimcore\Model\Element\ElementInterface $target ) : Pimcore\Model\Element\ElementInterface | string Returns a uniqe key for the element in the $target-Path (recursive)
getType ( Pimcore\Model\Element\ElementInterface $element ) : string determines the type of an element (object,asset,document)
getTypePath ( $element ) : string
getUniqueKey ( $element ) : string returns a unique key for an element
getValidKey ( $key, null $type ) : mixed | string
gridElementData ( Pimcore\Model\Element\ElementInterface $element ) : array
isPublished ( Pimcore\Model\Element\ElementInterface $element = null ) : boolean determines whether an element is published
isValidKey ( $key, $type ) : boolean
loadAllFields ( Pimcore\Model\Element\ElementInterface $element ) : Pimcore\Model\Element\ElementInterface
minimizePropertiesForEditmode ( $props ) : array
pathExists ( $path, $type = null ) : boolean
renewReferences ( Document | Asset | AbstractObject $data, $initial = true ) : mixed renews all references, for example after unserializing an ElementInterface
runSanityCheck ( )
scheduleForSanityCheck ( Pimcore\Model\Element\ElementInterface $element ) : void Schedules element with this id for sanity check to be cleaned of broken relations

보호된 메소드들

메소드 설명
performSanityCheck ( Pimcore\Model\Element\ElementInterface $element ) : void
updateChilds ( Pimcore\Model\Element\ElementInterface $target, Pimcore\Model\Element\ElementInterface $new ) : void

비공개 메소드들

메소드 설명
filterNullValues ( $var ) : boolean Callback for array_filter function.

메소드 상세

addTreeFilterJoins() 공개 정적인 메소드

Changes the query according to the custom view config
public static addTreeFilterJoins ( $cv, $childsList )
$cv array
$childsList

cleanupBrokenViews() 공개 메소드

... when removing a language the view isn't valid anymore
public cleanupBrokenViews ( )

correctPath() 공개 정적인 메소드

public static correctPath ( string $path ) : string
$path string
리턴 string

createFolderByPath() 공개 정적인 메소드

public static createFolderByPath ( $path, array $options = [] ) : Folder | Folder | Folder
$path
$options array
리턴 Pimcore\Model\Asset\Folder | Pimcore\Model\Document\Folder | Pimcore\Model\Object\Folder

findForbiddenPaths() 공개 정적인 메소드

find all elements which the user may not list and therefore may never be shown to the user
public static findForbiddenPaths ( string $type, $user ) : array
$type string asset|object|document
리턴 array

fixAllowedTypes() 공개 정적인 메소드

public static fixAllowedTypes ( $data, $type )

getCustomViewById() 공개 정적인 메소드

public static getCustomViewById ( $id )

getDependedElement() 공개 정적인 메소드

public static getDependedElement ( array $config ) : AbstractObject | Document | Asset
$config array
리턴 Pimcore\Model\Object\AbstractObject | Pimcore\Model\Document | Pimcore\Model\Asset

getDependencyForFrontend() 공개 정적인 메소드

public static getDependencyForFrontend ( Document | Asset | AbstractObject $element ) : array
$element Pimcore\Model\Document | Pimcore\Model\Asset | Pimcore\Model\Object\AbstractObject
리턴 array

getElementById() 공개 정적인 메소드

public static getElementById ( string $type, integer $id ) : Pimcore\Model\Element\ElementInterface
$type string
$id integer
리턴 Pimcore\Model\Element\ElementInterface

getElementByPath() 공개 정적인 메소드

public static getElementByPath ( string $type, string $path ) : Pimcore\Model\Element\ElementInterface
$type string
$path string
리턴 Pimcore\Model\Element\ElementInterface

getElementType() 공개 정적인 메소드

public static getElementType ( Pimcore\Model\Element\ElementInterface $element ) : string
$element Pimcore\Model\Element\ElementInterface $element
리턴 string

getFilename() 공개 정적인 메소드

public static getFilename ( Pimcore\Model\Element\ElementInterface $element ) : string
$element Pimcore\Model\Element\ElementInterface
리턴 string

getIdList() 공개 정적인 메소드

public static getIdList ( $list, $idGetter = 'getId' ) : array
$list array | \Pimcore\Model\Listing\AbstractListing
리턴 array

getIdPath() 공개 정적인 메소드

public static getIdPath ( $element ) : string
$element
리턴 string

getRequiredByDependenciesForFrontend() 공개 정적인 메소드

public static getRequiredByDependenciesForFrontend ( Dependency $d ) : array
$d Pimcore\Model\Dependency
리턴 array

getRequiresDependenciesForFrontend() 공개 정적인 메소드

public static getRequiresDependenciesForFrontend ( Dependency $d ) : array
$d Pimcore\Model\Dependency
리턴 array

getSafeVersionInfo() 공개 정적인 메소드

public static getSafeVersionInfo ( $versions )

getSaveCopyName() 공개 정적인 메소드

Returns a uniqe key for the element in the $target-Path (recursive)
public static getSaveCopyName ( string $type, string $sourceKey, Pimcore\Model\Element\ElementInterface $target ) : Pimcore\Model\Element\ElementInterface | string
$type string
$sourceKey string
$target Pimcore\Model\Element\ElementInterface
리턴 Pimcore\Model\Element\ElementInterface | string

getType() 공개 정적인 메소드

determines the type of an element (object,asset,document)
public static getType ( Pimcore\Model\Element\ElementInterface $element ) : string
$element Pimcore\Model\Element\ElementInterface
리턴 string

getTypePath() 공개 정적인 메소드

public static getTypePath ( $element ) : string
$element
리턴 string

getUniqueKey() 공개 정적인 메소드

returns a unique key for an element
public static getUniqueKey ( $element ) : string
$element
리턴 string

getValidKey() 공개 정적인 메소드

public static getValidKey ( $key, null $type ) : mixed | string
$key
$type null
리턴 mixed | string

gridElementData() 공개 정적인 메소드

public static gridElementData ( Pimcore\Model\Element\ElementInterface $element ) : array
$element Pimcore\Model\Element\ElementInterface
리턴 array

isPublished() 공개 정적인 메소드

determines whether an element is published
public static isPublished ( Pimcore\Model\Element\ElementInterface $element = null ) : boolean
$element Pimcore\Model\Element\ElementInterface
리턴 boolean

isValidKey() 공개 정적인 메소드

public static isValidKey ( $key, $type ) : boolean
$key
$type
리턴 boolean

loadAllFields() 공개 정적인 메소드

public static loadAllFields ( Pimcore\Model\Element\ElementInterface $element ) : Pimcore\Model\Element\ElementInterface
$element Pimcore\Model\Element\ElementInterface
리턴 Pimcore\Model\Element\ElementInterface

minimizePropertiesForEditmode() 공개 정적인 메소드

public static minimizePropertiesForEditmode ( $props ) : array
$props
리턴 array

pathExists() 공개 정적인 메소드

public static pathExists ( $path, $type = null ) : boolean
$path
$type
리턴 boolean

performSanityCheck() 보호된 정적인 메소드

protected static performSanityCheck ( Pimcore\Model\Element\ElementInterface $element ) : void
$element Pimcore\Model\Element\ElementInterface
리턴 void

renewReferences() 공개 정적인 메소드

renews all references, for example after unserializing an ElementInterface
public static renewReferences ( Document | Asset | AbstractObject $data, $initial = true ) : mixed
$data Pimcore\Model\Document | Pimcore\Model\Asset | Pimcore\Model\Object\AbstractObject
리턴 mixed

runSanityCheck() 공개 정적인 메소드

public static runSanityCheck ( )

scheduleForSanityCheck() 공개 정적인 메소드

Schedules element with this id for sanity check to be cleaned of broken relations
public static scheduleForSanityCheck ( Pimcore\Model\Element\ElementInterface $element ) : void
$element Pimcore\Model\Element\ElementInterface
리턴 void

updateChilds() 보호된 메소드

protected updateChilds ( Pimcore\Model\Element\ElementInterface $target, Pimcore\Model\Element\ElementInterface $new ) : void
$target Pimcore\Model\Element\ElementInterface the parent element
$new Pimcore\Model\Element\ElementInterface the newly inserted child
리턴 void