15 use \PKP\components\forms\FormComponent;
16 use \PKP\components\forms\FieldOptions;
17 use \PKP\components\forms\FieldSelect;
18 use \PKP\components\forms\FieldText;
19 use \PKP\components\forms\FieldUploadImage;
21 define(
'FORM_ISSUE_ENTRY',
'issueEntry');
45 $sections =
\Services::get(
'section')->getSectionList($publicationContext->getId());
47 foreach ($sections as $section) {
49 'label' => (($section[
'group'])? __(
'publication.inactiveSection', [
'section' => $section[
'title']]) : $section[
'title']),
50 'value' => (
int) $section[
'id'],
54 'label' => __(
'section.section'),
55 'options' => $sectionOptions,
56 'value' => (
int) $publication->getData(
'sectionId'),
60 $categoryOptions = [];
62 $categories = $categoryDao->getByContextId($publicationContext->getId())->toAssociativeArray();
63 foreach ($categories as $category) {
64 $label = $category->getLocalizedTitle();
65 if ($category->getParentId()) {
66 $label = $categories[$category->getParentId()]->getLocalizedTitle() .
' > ' . $label;
68 $categoryOptions[] = [
69 'value' => (int) $category->getId(),
70 'label' => $category->getLocalizedTitle(),
73 if (!empty($categoryOptions)) {
75 'label' => __(
'submission.submit.placement.categories'),
76 'value' => (array) $publication->getData(
'categoryIds'),
77 'options' => $categoryOptions,
82 'label' => __(
'editor.article.coverImage'),
83 'value' => $publication->getData(
'coverImage'),
84 'isMultilingual' =>
true,
85 'baseUrl' => $baseUrl,
87 'url' => $temporaryFileApiUrl,
91 'label' => __(
'publication.urlPath'),
92 'description' => __(
'publication.urlPath.description'),
93 'value' => $publication->getData(
'urlPath'),
95 ->addField(
new FieldText(
'datePublished', [
96 'label' => __(
'publication.datePublished'),
97 'description' => __(
'publication.datePublished.description'),
98 'value' => $publication->getData(
'datePublished'),