本文整理匯總了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');
}