Exemple #1
0
 public function getProviderTitleList()
 {
     $titles = array();
     foreach ($this->providers as $provider) {
         $titles[] = $provider->title;
     }
     return SwatString::toList($titles);
 }
Exemple #2
0
 protected function initInternal()
 {
     AdminIndex::initInternal();
     $this->id = SiteApplication::initVar('id');
     if (is_numeric($this->id)) {
         $this->id = intval($this->id);
     }
     $this->initCredit();
     $this->initInquisition();
     $this->ui->loadFromXML($this->getUiXml());
     $local_ui = new SwatUI();
     $local_ui->loadFromXML($this->getCreditDetailsViewXml());
     $provider_titles = array();
     foreach ($this->credit->front_matter->providers as $provider) {
         $provider_titles[] = $provider->credit_title_plural;
     }
     $local_ui->getWidget('details_view')->getField('hour')->title = SwatString::toList($provider_titles);
     $view = $this->ui->getWidget('details_view');
     foreach ($local_ui->getWidget('details_view')->getFields() as $field) {
         $view->appendField($field);
     }
 }
 protected function getListOptionTitle(CMEFrontMatter $front_matter)
 {
     $account = $this->app->session->account;
     $hours = $account->getEarnedCMECreditHoursByFrontMatter($front_matter);
     $locale = SwatI18NLocale::get();
     ob_start();
     $this->displayTitle($front_matter);
     $field = abs($hours - 1.0) < 0.01 ? 'credit_title' : 'credit_title_plural';
     $titles = array();
     foreach ($front_matter->providers as $provider) {
         $em_tag = new SwatHtmlTag('em');
         $em_tag->setContent($provider->{$field});
         $titles[] = $em_tag->__toString();
     }
     $formatted_provider_credit_title = SwatString::toList($titles);
     $hours_span = new SwatHtmlTag('span');
     $hours_span->class = 'hours';
     $hours_span->setContent(sprintf(CME::_('%s %s from %s'), SwatString::minimizeEntities($locale->formatNumber($hours)), $formatted_provider_credit_title, SwatString::minimizeEntities($front_matter->getProviderTitleList())), 'text/xml');
     $hours_span->display();
     $details = $this->getFrontMatterDetails($front_matter);
     if ($details != '') {
         $details_span = new SwatHtmlTag('span');
         $details_span->class = 'details';
         $details_span->setContent($details);
         $details_span->display();
     }
     return ob_get_clean();
 }
Exemple #4
0
 /**
  * Gets a displayable comma-list of this tag list
  *
  * @return string a display list string representation of this tag list.
  */
 public function getAsList()
 {
     $list = array();
     foreach ($this->tags as $tag) {
         $list[] = $tag->getTitle();
     }
     return SwatString::toList($list);
 }
Exemple #5
0
 protected function buildInternal()
 {
     parent::buildInternal();
     $this->ui->getWidget('edit_frame')->title = $this->credit->getTitle();
     $provider_titles = array();
     foreach ($this->credit->front_matter->providers as $provider) {
         $provider_titles[] = $provider->credit_title_plural;
     }
     $this->ui->getWidget('hours_field')->title = SwatString::toList($provider_titles);
 }