public function libraryAction()
 {
     if (($target = $this->request->getParam('target')) != null) {
         $uo = new UserOptions($this->request);
         $type = $uo->getSessionData('source_type');
         $t = new Targets($type);
         $institution = $t->getIndividualTargets($target);
         $this->data->setVariable('institution', $institution);
         $libs = new Libraries($target);
         $this->data->setVariable('libraries', $libs);
         $this->data->setVariable('useroptions', $uo);
         if ($uo->existsInSessionData('affiliation')) {
             $affil = $uo->getSessionData('affiliation');
             $a = new Affiliations();
             $this->data->setVariable('entitlements', $a->getEntitlementsAtInstitution($target, $affil));
         }
     }
     return $this->data;
 }