本文整理匯總了PHP中ImportExportPlugin::getStatusNames方法的典型用法代碼示例。如果您正苦於以下問題:PHP ImportExportPlugin::getStatusNames方法的具體用法?PHP ImportExportPlugin::getStatusNames怎麽用?PHP ImportExportPlugin::getStatusNames使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ImportExportPlugin
的用法示例。
在下文中一共展示了ImportExportPlugin::getStatusNames方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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);
}
}
示例3: renderFilter
/**
* @copydoc GridHandler::renderFilter()
*/
function renderFilter($request, $filterData = array())
{
$context = $request->getContext();
$issueDao = DAORegistry::getDAO('IssueDAO');
$issuesIterator = $issueDao->getPublishedIssues($context->getId());
$issues = $issuesIterator->toArray();
foreach ($issues as $issue) {
$issueOptions[$issue->getId()] = $issue->getIssueIdentification();
}
$issueOptions[0] = __('plugins.importexport.common.filter.issue');
ksort($issueOptions);
$statusNames = $this->_plugin->getStatusNames();
$filterColumns = $this->getFilterColumns();
$allFilterData = array_merge($filterData, array('columns' => $filterColumns, 'issues' => $issueOptions, 'status' => $statusNames, 'gridId' => $this->getId()));
return parent::renderFilter($request, $allFilterData);
}
示例4: renderFilter
/**
* @copydoc GridHandler::renderFilter()
*/
function renderFilter($request, $filterData = array())
{
$statusNames = $this->_plugin->getStatusNames();
$allFilterData = array_merge($filterData, array('status' => $statusNames, 'gridId' => $this->getId()));
return parent::renderFilter($request, $allFilterData);
}