本文整理汇总了PHP中TYPO3\CMS\Core\Resource\FileInterface::isIndexed方法的典型用法代码示例。如果您正苦于以下问题:PHP FileInterface::isIndexed方法的具体用法?PHP FileInterface::isIndexed怎么用?PHP FileInterface::isIndexed使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TYPO3\CMS\Core\Resource\FileInterface
的用法示例。
在下文中一共展示了FileInterface::isIndexed方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getFileForLocalProcessing
/**
* Returns a (local copy of) a file for processing it. When changing the
* file, you have to take care of replacing the current version yourself!
*
* @param \TYPO3\CMS\Core\Resource\FileInterface $file
* @param bool $writable Set this to FALSE if you only need the file for read operations. This might speed up things, e.g. by using a cached local version. Never modify the file if you have set this flag!
* @return string The path to the file on the local disk
*/
public function getFileForLocalProcessing(\TYPO3\CMS\Core\Resource\FileInterface $file, $writable = true)
{
error_log('FAL DRIVER: ' . __FUNCTION__);
if (!$file->isIndexed() || !$file->getProperty('yagItem') instanceof \Tx_Yag_Domain_Model_Item) {
$identifier = $file->getIdentifier();
$fileInfo = $this->getFileInfoByIdentifier($identifier);
$sourceUri = $this->yagFileSystemDiv->makePathAbsolute($fileInfo['sourceUri']);
} else {
$item = $file->getProperty('yagItem');
$sourceUri = $this->yagFileSystemDiv->makePathAbsolute($item->getSourceuri());
}
return $sourceUri;
}
示例2: getIsMetadataEditable
/**
* @return bool
*/
public function getIsMetadataEditable()
{
return $this->resource->isIndexed() && $this->getIsWritable() && $this->getBackendUser()->check('tables_modify', 'sys_file_metadata');
}