PHP Class Pimcore\Model\Document\Service

Inheritance: extends Pimcore\Model\Element\Service
Exibir arquivo Open project: pimcore/pimcore Class Usage Examples

Protected Properties

Property Type Description
$_copyRecursiveIds array
$_user User

Public Methods

Method Description
__construct ( null $user = null )
copyAsChild ( $target, $source, boolean $enableInheritance = false, boolean $resetIndex = false ) : Document
copyContents ( $target, $source ) : mixed
copyRecursive ( Document $target, Document $source ) : Document
getByUrl ( $url ) : Document
getUniqueKey ( $item, $nr )
gridDocumentData ( Document $document ) : void
isValidType ( $type ) : boolean
loadAllDocumentFields ( $doc ) : mixed
pathExists ( $path, $type = null ) : boolean
render ( Document $document, array $params = [], boolean $useLayout = false ) : string static function to render a document outside of a view
rewriteIds ( $document, $rewriteConfig, $params = [] ) : Document Rewrites id from source to target, $rewriteConfig contains array( "document" => array( SOURCE_ID => TARGET_ID, SOURCE_ID => TARGET_ID ), "object" => array(.
saveRecursive ( $document, integer $collectGarbageAfterIteration = 25, integer &$saved ) Save document and all child documents

Method Details

__construct() public method

public __construct ( null $user = null )
$user null

copyAsChild() public method

public copyAsChild ( $target, $source, boolean $enableInheritance = false, boolean $resetIndex = false ) : Document
$target
$source
$enableInheritance boolean
$resetIndex boolean
return Pimcore\Model\Document

copyContents() public method

public copyContents ( $target, $source ) : mixed
$target
$source
return mixed

copyRecursive() public method

public copyRecursive ( Document $target, Document $source ) : Document
$target Pimcore\Model\Document
$source Pimcore\Model\Document
return Pimcore\Model\Document copied document

getByUrl() public static method

public static getByUrl ( $url ) : Document
$url
return Pimcore\Model\Document

getUniqueKey() public static method

public static getUniqueKey ( $item, $nr )

gridDocumentData() public static method

public static gridDocumentData ( Document $document ) : void
$document Pimcore\Model\Document
return void

isValidType() public static method

public static isValidType ( $type ) : boolean
$type
return boolean

loadAllDocumentFields() public static method

public static loadAllDocumentFields ( $doc ) : mixed
$doc
return mixed

pathExists() public static method

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

render() public static method

static function to render a document outside of a view
public static render ( Document $document, array $params = [], boolean $useLayout = false ) : string
$document Pimcore\Model\Document
$params array
$useLayout boolean
return string

rewriteIds() public static method

..), "asset" => array(...) )
public static rewriteIds ( $document, $rewriteConfig, $params = [] ) : Document
$document
$rewriteConfig
return Pimcore\Model\Document

saveRecursive() public static method

Save document and all child documents
public static saveRecursive ( $document, integer $collectGarbageAfterIteration = 25, integer &$saved )
$document
$collectGarbageAfterIteration integer
$saved integer

Property Details

$_copyRecursiveIds protected_oe property

protected array $_copyRecursiveIds
return array

$_user protected_oe property

protected User $_user
return User