本文整理匯總了PHP中ImportExportPlugin::getStatusActions方法的典型用法代碼示例。如果您正苦於以下問題:PHP ImportExportPlugin::getStatusActions方法的具體用法?PHP ImportExportPlugin::getStatusActions怎麽用?PHP ImportExportPlugin::getStatusActions使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ImportExportPlugin
的用法示例。
在下文中一共展示了ImportExportPlugin::getStatusActions方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getTemplateVarsFromRowColumn
/**
* Extracts variables for a given column from a data element
* so that they may be assigned to template before rendering.
*
* @copydoc DataObjectGridCellProvider::getTemplateVarsFromRowColumn()
*/
function getTemplateVarsFromRowColumn($row, $column)
{
$publishedIssue = $row->getData();
$columnId = $column->getId();
assert(is_a($publishedIssue, 'Issue') && !empty($columnId));
switch ($columnId) {
case 'identification':
return array('label' => '');
case 'published':
return array('label' => $publishedIssue->getDatePublished());
case 'pubId':
return array('label' => $publishedIssue->getStoredPubId($this->_plugin->getPubIdType()));
case 'status':
$status = $publishedIssue->getData($this->_plugin->getDepositStatusSettingName());
$statusNames = $this->_plugin->getStatusNames();
$statusActions = $this->_plugin->getStatusActions($publishedIssue);
if ($status) {
if (array_key_exists($status, $statusActions)) {
$label = '';
} else {
assert(array_key_exists($status, $statusNames));
$label = $statusNames[$status];
}
} else {
$label = $statusNames[DOI_EXPORT_STATUS_NOT_DEPOSITED];
}
return array('label' => $label);
}
}
示例2: getTemplateVarsFromRowColumn
/**
* Extracts variables for a given column from a data element
* so that they may be assigned to template before rendering.
*
* @copydoc DataObjectGridCellProvider::getTemplateVarsFromRowColumn()
*/
function getTemplateVarsFromRowColumn($row, $column)
{
$publishedSubmissionGalley = $row->getData();
$columnId = $column->getId();
assert(is_a($publishedSubmissionGalley, 'ArticleGAlley') && !empty($columnId));
switch ($columnId) {
case 'id':
return array('label' => $publishedSubmissionGalley->getId());
case 'title':
return array('label' => '');
case 'issue':
return array('label' => '');
case 'galley':
return array('label' => $publishedSubmissionGalley->getGalleyLabel());
case 'pubId':
return array('label' => $publishedSubmissionGalley->getStoredPubId($this->_plugin->getPubIdType()));
case 'status':
$status = $publishedSubmissionGalley->getData($this->_plugin->getDepositStatusSettingName());
$statusNames = $this->_plugin->getStatusNames();
$statusActions = $this->_plugin->getStatusActions($publishedSubmissionGalley);
if ($status) {
if (array_key_exists($status, $statusActions)) {
$label = '';
} else {
assert(array_key_exists($status, $statusNames));
$label = $statusNames[$status];
}
} else {
$label = $statusNames[DOI_EXPORT_STATUS_NOT_DEPOSITED];
}
return array('label' => $label);
}
}