Example #1
0
 /**
  * @param  Content $content
  * @return string
  */
 public function __invoke(Content $content)
 {
     /**
      * Watch out for to many separate paths
      */
     switch ($content->getHandler()->getHandler()) {
         case 'member':
             return $this->parseChart();
         case 'member_list':
             return $this->parseMemberList();
         case 'member_presidium':
             return $this->parsePresidiumList();
         case 'member_steeringboard':
             return $this->parseSteeringboardList();
         default:
             return sprintf("No handler available for <code>%s</code> in class <code>%s</code>", $content->getHandler()->getHandler(), __CLASS__);
     }
 }
Example #2
0
 /**
  * @param Content $content
  */
 public function extractContentParam(Content $content)
 {
     foreach ($content->getContentParam() as $param) {
         /**
          * When the parameterId is 0 (so we want to get the article from the URL
          */
         switch ($param->getParameter()->getParam()) {
             case 'optin':
                 if (!is_null($optInId = $param->getParameterId())) {
                     $this->setOptIn($this->getContactService()->findEntityById('optIn', $optInId));
                 }
                 break;
             default:
                 $this->setContactId($param->getParameterId());
                 break;
         }
     }
 }
Example #3
0
 /**
  * @param Content $content
  */
 public function extractContentParam(Content $content)
 {
     if (!is_null($this->getRouteMatch()->getParam('docRef'))) {
         $this->setChallengeDocRef($this->getRouteMatch()->getParam('docRef'));
     }
     foreach ($content->getContentParam() as $param) {
         /*
          * When the parameterId is 0 (so we want to get the article from the URL
          */
         switch ($param->getParameter()->getParam()) {
             case 'docRef':
                 if (!is_null($docRef = $this->getRouteMatch()->getParam($param->getParameter()->getParam()))) {
                     $this->setChallengeDocRef($docRef);
                 }
                 break;
             default:
                 $this->setChallengeId($param->getParameterId());
                 break;
         }
     }
 }
Example #4
0
 public function extractContentParam(Content $content)
 {
     //Give default the docRef to the handler, this does not harm
     if (!is_null($this->getRouteMatch()->getParam('docRef'))) {
         $this->setCalendarDocRef($this->getRouteMatch()->getParam('docRef'));
     }
     foreach ($content->getContentParam() as $param) {
         /**
          * When the parameterId is 0 (so we want to get the article from the URL
          */
         switch ($param->getParameter()->getParam()) {
             case 'docRef':
                 if (!is_null($this->getRouteMatch()->getParam($param->getParameter()->getParam()))) {
                     $this->setCalendarDocRef($this->getRouteMatch()->getParam('docRef'));
                 }
                 break;
             case 'limit':
                 if ('0' === $param->getParameterId()) {
                     $this->setLimit(null);
                 } else {
                     $this->setLimit($param->getParameterId());
                 }
                 break;
             case 'type':
                 $this->setType($param->getParameterId());
                 break;
             case 'year':
                 if (!is_null($year = $this->getRouteMatch()->getParam($param->getParameter()->getParam()))) {
                     $this->setYear($year);
                 } elseif ('0' === $param->getParameterId()) {
                     $this->setYear($this->getCalendarService()->getOptions()->getDefaultYear());
                 } else {
                     $this->setYear($param->getParameterId());
                 }
                 break;
             default:
                 $this->setCalendarId($param->getParameterId());
                 break;
         }
     }
 }
Example #5
0
 /**
  * @param Content $content
  */
 public function extractContentParam(Content $content)
 {
     if (!is_null($this->getRouteMatch()->getParam('docRef'))) {
         $this->getCallService()->setCall($this->getCallService()->findEntityByDocRef('Call\\Call', $this->getRouteMatch()->getParam('docRef')));
         if (!$this->getCallService()->isEmpty()) {
             $this->setCallId($this->getCallService()->getCall()->getId());
         }
     }
     foreach ($content->getContentParam() as $param) {
         /**
          * When the parameterId is 0 (so we want to get the article from the URL
          */
         switch ($param->getParameter()->getParam()) {
             case 'session':
                 if (!is_null($sessionId = $this->getRouteMatch()->getParam($param->getParameter()->getParam()))) {
                     $this->setSessionId($sessionId);
                 } else {
                     $this->setSessionId($param->getParameterId());
                 }
                 break;
             case 'call':
                 if (!is_null($callId = $this->getRouteMatch()->getParam($param->getParameter()->getParam()))) {
                     $this->setCallId($callId);
                 }
                 break;
             case 'program':
                 if (!is_null($programId = $this->getRouteMatch()->getParam($param->getParameter()->getParam()))) {
                     $this->setProgramId($programId);
                 }
                 break;
         }
     }
 }
Example #6
0
 /**
  * @param Content $content
  */
 public function extractContentParam(Content $content)
 {
     foreach ($content->getContentParam() as $param) {
         /*
          * When the parameterId is 0 (so we want to get the article from the URL
          */
         $this->determineParam($param);
     }
 }
Example #7
0
 /**
  * @param Content $content
  */
 public function extractContentParam(Content $content)
 {
     //Give default the docRef to the handler, this does not harm
     if (!is_null($this->getRouteMatch()->getParam('docRef'))) {
         $this->setProjectDocRef($this->getRouteMatch()->getParam('docRef'));
     }
     foreach ($content->getContentParam() as $param) {
         /*
          * When the parameterId is 0 (so we want to get the article from the URL
          */
         $this->determineParam($param);
     }
 }
Example #8
0
 /**
  * @param Content $content
  */
 public function extractContentParam(Content $content)
 {
     //Give default the docRef to the handler, this does not harm
     if (!is_null($this->getRouteMatch()->getParam('docRef'))) {
         $this->setCountryDocRef($this->getRouteMatch()->getParam('docRef'));
     }
     foreach ($content->getContentParam() as $param) {
         switch ($param->getParameter()->getParam()) {
             case 'docRef':
                 if (!is_null($docRef = $this->getRouteMatch()->getParam($param->getParameter()->getParam()))) {
                     $this->setCountryDocRef($docRef);
                 }
                 break;
             case 'limit':
                 if ('0' === $param->getParameterId()) {
                     $limit = null;
                 } else {
                     $limit = $param->getParameterId();
                 }
                 $this->setLimit($limit);
                 break;
             default:
                 $this->setCountryId($param->getParameterId());
                 break;
         }
     }
 }
 /**
  * @param Content $content
  */
 public function extractContentParam(Content $content)
 {
     //Give default the docRef to the handler, this does not harm
     if (!is_null($this->getRouteMatch()->getParam('docRef'))) {
         $this->setDocRef($this->getRouteMatch()->getParam('docRef'));
     }
     foreach ($content->getContentParam() as $param) {
         /*
          * When the parameterId is 0 (so we want to get the article from the URL
          */
         switch ($param->getParameter()->getParam()) {
             case 'docRef':
                 if (!is_null($docRef = $this->getRouteMatch()->getParam($param->getParameter()->getParam()))) {
                     $this->setDocRef($docRef);
                 }
                 break;
             case 'limit':
                 if ('0' === $param->getParameterId()) {
                     $limit = null;
                 } else {
                     $limit = $param->getParameterId();
                 }
                 $this->setLimit($limit);
                 break;
             case 'organisation':
                 $this->setId($param->getParameterId());
                 break;
             default:
                 break;
         }
     }
 }