コード例 #1
0
ファイル: UploadNdaLabel.php プロジェクト: iteaoffice/program
 /**
  * @param Mvc $page
  *
  * @return void;
  */
 public function __invoke(Mvc $page)
 {
     if ($this->getEntities()->containsKey(Call::class)) {
         /** @var Nda $nda */
         $call = $this->getEntities()->get(Call::class);
         $label = (string) $this->translate(sprintf("txt-view-nda-for-call-%s", $call));
     } else {
         $label = $this->translate('txt-nav-nda');
     }
     $page->set('label', $label);
 }
コード例 #2
0
ファイル: SelectionLabel.php プロジェクト: iteaoffice/contact
 /**
  * @param Mvc $page
  *
  * @return void
  */
 public function __invoke(Mvc $page)
 {
     if ($this->getEntities()->containsKey(Selection::class)) {
         /** @var Selection $selection */
         $selection = $this->getEntities()->get(Selection::class);
         $page->setParams(array_merge($page->getParams(), ['id' => $selection->getId()]));
         $label = (string) $selection->getSelection();
     } else {
         $label = $this->translate('txt-nav-selection');
     }
     $page->set('label', $label);
 }
コード例 #3
0
ファイル: FacebookLabel.php プロジェクト: iteaoffice/contact
 /**
  * Parse a Funder Facebook label
  *
  * @param Mvc $page
  *
  * @return void
  */
 public function __invoke(Mvc $page)
 {
     if ($this->getEntities()->containsKey(Facebook::class)) {
         /** @var Facebook $facebook */
         $facebook = $this->getEntities()->get(Facebook::class);
         $page->setParams(array_merge($page->getParams(), ['id' => $facebook->getId()]));
         $label = (string) $facebook->getFacebook();
     } else {
         $label = $this->translate('txt-nav-facebook');
     }
     $page->set('label', $label);
 }
コード例 #4
0
 /**
  * @param Mvc $page
  *
  * @return void
  */
 public function __invoke(Mvc $page)
 {
     if ($this->getEntities()->containsKey(Organisation::class)) {
         /** @var Organisation $organisation */
         $organisation = $this->getEntities()->get(Organisation::class);
         $page->setParams(array_merge($page->getParams(), ['id' => $organisation->getId()]));
         $label = (string) $organisation;
     } else {
         $label = $this->translate('txt-nav-view');
     }
     $page->set('label', $label);
 }
コード例 #5
0
ファイル: CalendarLabel.php プロジェクト: iteaoffice/calendar
 /**
  * @param Mvc $page
  *
  * @return void;
  */
 public function __invoke(Mvc $page)
 {
     if ($this->getEntities()->containsKey(Calendar::class)) {
         /** @var Calendar $calendar */
         $calendar = $this->getEntities()->get(Calendar::class);
         $page->setParams(array_merge($page->getParams(), ['id' => $calendar->getId()]));
         $label = (string) $calendar;
     } else {
         $label = $this->translate('txt-nav-calendar');
     }
     $page->set('label', $label);
 }
コード例 #6
0
ファイル: ContactLabel.php プロジェクト: iteaoffice/contact
 /**
  * Parse a Funder Contact label
  *
  * @param Mvc $page
  *
  * @return void
  */
 public function __invoke(Mvc $page)
 {
     if ($this->getEntities()->containsKey(Contact::class)) {
         /** @var Contact $contact */
         $contact = $this->getEntities()->get(Contact::class);
         $page->setParams(array_merge($page->getParams(), ['id' => $contact->getId()]));
         $label = (string) $contact->getDisplayName();
     } else {
         $label = $this->translate('txt-nav-contact');
     }
     $page->set('label', $label);
 }
コード例 #7
0
 /**
  * @param Mvc $page
  *
  * @return void
  */
 public function __invoke(Mvc $page)
 {
     if ($this->getEntities()->containsKey(Affiliation::class)) {
         /** @var Affiliation $affiliation */
         $affiliation = $this->getEntities()->get(Affiliation::class);
         $this->getEntities()->set(Project::class, $affiliation->getProject());
         $page->setParams(array_merge($page->getParams(), ['id' => $affiliation->getId()]));
         $label = (string) $affiliation;
     } else {
         $label = $this->translate('txt-nav-view');
     }
     $page->set('label', $label);
 }
コード例 #8
0
ファイル: DocumentLabel.php プロジェクト: iteaoffice/calendar
 /**
  * @param Mvc $page
  *
  * @return void;
  */
 public function __invoke(Mvc $page)
 {
     if ($this->getEntities()->containsKey(Document::class)) {
         /** @var Document $document */
         $document = $this->getEntities()->get(Document::class);
         $this->getEntities()->set(Calendar::class, $document->getCalendar());
         $page->setParams(array_merge($page->getParams(), ['id' => $document->getId()]));
         $label = (string) $document;
     } else {
         $label = $this->translate('txt-nav-document');
     }
     $page->set('label', $label);
 }
コード例 #9
0
ファイル: DoaLabel.php プロジェクト: iteaoffice/affiliation
 /**
  * @param Mvc $page
  *
  * @return void
  */
 public function __invoke(Mvc $page)
 {
     if ($this->getEntities()->containsKey(Doa::class)) {
         /** @var Doa $doa */
         $doa = $this->getEntities()->get(Doa::class);
         $this->getEntities()->set(Affiliation::class, $doa->getAffiliation());
         $this->getEntities()->set(Project::class, $doa->getAffiliation()->getProject());
         $page->setParams(array_merge($page->getParams(), ['id' => $doa->getId()]));
         $label = $this->translate('txt-doa');
     } else {
         $label = $this->translate('txt-nav-view');
     }
     $page->set('label', $label);
 }
コード例 #10
0
ファイル: NdaLabel.php プロジェクト: iteaoffice/program
 /**
  * @param Mvc $page
  *
  * @return void;
  */
 public function __invoke(Mvc $page)
 {
     if ($this->getEntities()->containsKey(Nda::class)) {
         /** @var Nda $nda */
         $nda = $this->getEntities()->get(Nda::class);
         if (!is_null($nda->getCall())) {
             $page->setParams(array_merge($page->getParams(), ['id' => $nda->getId(), 'callId' => $nda->getCall()->getId()]));
             $label = (string) $nda;
         } else {
             $page->setParams(array_merge($page->getParams(), ['id' => $nda->getId()]));
             $label = (string) $nda;
         }
     } else {
         $label = $this->translate('txt-nav-nda');
     }
     $page->set('label', $label);
 }