PHP Class Pimcore\Model\Asset\Service

Inheritance: extends Pimcore\Model\Element\Service
显示文件 Open project: pimcore/pimcore Class Usage Examples

Protected Properties

Property Type Description
$_copyRecursiveIds array
$_user Pimcore\Model\User

Public Methods

Method Description
__construct ( User $user = null )
copyAsChild ( Asset $target, Asset $source ) : Asset
copyContents ( $target, $source ) : mixed
copyRecursive ( Asset $target, Asset $source ) : Asset
expandMetadataForEditmode ( $metadata ) : array
getUniqueKey ( $item, integer $nr ) : string
gridAssetData ( Asset $asset )
loadAllFields ( Pimcore\Model\Element\ElementInterface $element ) : Pimcore\Model\Element\ElementInterface
minimizeMetadata ( $metadata ) : array
pathExists ( $path, $type = null ) : boolean
rewriteIds ( $asset, $rewriteConfig ) : Asset Rewrites id from source to target, $rewriteConfig contains array( "document" => array( SOURCE_ID => TARGET_ID, SOURCE_ID => TARGET_ID ), "object" => array(.

Method Details

__construct() public method

public __construct ( User $user = null )
$user Pimcore\Model\User

copyAsChild() public method

public copyAsChild ( Asset $target, Asset $source ) : Asset
$target Pimcore\Model\Asset
$source Pimcore\Model\Asset
return Pimcore\Model\Asset copied asset

copyContents() public method

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

copyRecursive() public method

public copyRecursive ( Asset $target, Asset $source ) : Asset
$target Pimcore\Model\Asset
$source Pimcore\Model\Asset
return Pimcore\Model\Asset copied asset

expandMetadataForEditmode() public static method

public static expandMetadataForEditmode ( $metadata ) : array
$metadata
return array

getUniqueKey() public static method

public static getUniqueKey ( $item, integer $nr ) : string
$item \Pimcore\Model\Asset
$nr integer
return string

gridAssetData() public static method

public static gridAssetData ( Asset $asset )
$asset Pimcore\Model\Asset

loadAllFields() public static method

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

minimizeMetadata() public static method

public static minimizeMetadata ( $metadata ) : array
$metadata
return array

pathExists() public static method

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

rewriteIds() public static method

..), "asset" => array(...) )
public static rewriteIds ( $asset, $rewriteConfig ) : Asset
$asset
$rewriteConfig
return Pimcore\Model\Asset

Property Details

$_copyRecursiveIds protected_oe property

protected array $_copyRecursiveIds
return array

$_user protected_oe property

protected User,Pimcore\Model $_user
return Pimcore\Model\User