Beispiel #1
0
 /**
  * Affiche la liste des site de production pour lesquel l'utilisateur connecté à les droits d'accès
  * @param int $paramIdUser
  * @param HtmlListSelectTagName $paramObjet
  * @param boolean $paramIsEditable
  * @param int $paramIdDefault
  * @return string
  */
 public static function showListeDeroulanteSiteProdByAcces($paramIdUser, HtmlListSelectTagName $paramObjet, $paramIsEditable, $paramIdDefault)
 {
     $arraySite = DatabaseOperation::convertSqlStatementWithKeyAndOneFieldToArray('SELECT DISTINCT ' . GeoModel::KEYNAME . ',' . GeoModel::FIELDNAME_GEO . ' FROM ' . GeoModel::TABLENAME . ', ' . FtaActionSiteModel::TABLENAME . ', ' . IntranetActionsModel::TABLENAME . ', ' . IntranetDroitsAccesModel::TABLENAME . ' WHERE ' . GeoModel::FIELDNAME_GEO . '<>\'\'' . ' AND ' . FtaActionSiteModel::TABLENAME . '.' . FtaActionSiteModel::FIELDNAME_ID_SITE . '=' . GeoModel::KEYNAME . ' AND ' . IntranetActionsModel::TABLENAME . '.' . IntranetActionsModel::KEYNAME . ' AND ' . FtaActionSiteModel::TABLENAME . '.' . FtaActionSiteModel::FIELDNAME_ID_INTRANET_ACTIONS . '=' . IntranetActionsModel::TABLENAME . '.' . IntranetActionsModel::KEYNAME . ' AND ' . IntranetActionsModel::TABLENAME . '.' . IntranetActionsModel::KEYNAME . '=' . IntranetDroitsAccesModel::TABLENAME . '.' . IntranetDroitsAccesModel::FIELDNAME_ID_INTRANET_ACTIONS . ' AND ' . IntranetDroitsAccesModel::FIELDNAME_ID_USER . '=' . $paramIdUser . ' AND ' . IntranetDroitsAccesModel::TABLENAME . '.' . IntranetDroitsAccesModel::FIELDNAME_NIVEAU_INTRANET_DROITS_ACCES . '=' . IntranetNiveauAccesModel::NIVEAU_GENERIC_TRUE . ' ORDER BY ' . GeoModel::FIELDNAME_GEO);
     $paramObjet->setArrayListContent($arraySite);
     $paramObjet->getAttributes()->getName()->setValue(GeoModel::KEYNAME);
     $paramObjet->setLabel(DatabaseDescription::getFieldDocLabel(GeoModel::TABLENAME, GeoModel::FIELDNAME_GEO));
     $paramObjet->setIsEditable($paramIsEditable);
     $paramObjet->setSelectedValue($paramIdDefault);
     $listeSiteProduction = $paramObjet->getHtmlResult();
     return $listeSiteProduction;
 }
 /**
  * Affiche la liste des espaces de travail pour lesquel l'utilisateur connecté à les droits d'accès
  * @param int $paramIdUser
  * @param HtmlListSelectTagName $paramObjetList
  * @param boolean $paramIsEditable
  * @param int $paramIdDefault
  * @return string
  */
 public static function showListeDeroulanteNomWorkflowByAcces($paramIdUser, HtmlListSelectTagName $paramObjetList, $paramIsEditable, $paramIdRole, $paramIdDefault = NULL)
 {
     $arrayWorkflow = DatabaseOperation::convertSqlStatementWithKeyAndOneFieldToArray('SELECT DISTINCT ' . self::TABLENAME . '.' . self::KEYNAME . ',' . self::FIELDNAME_DESCRIPTION_FTA_WORKFLOW . ' FROM ' . self::TABLENAME . ', ' . IntranetDroitsAccesModel::TABLENAME . ', ' . FtaWorkflowStructureModel::TABLENAME . ' WHERE ' . self::FIELDNAME_DESCRIPTION_FTA_WORKFLOW . '<>\'\'' . ' AND ' . self::TABLENAME . '.' . self::FIELDNAME_ID_INTRANET_ACTIONS . '=' . IntranetDroitsAccesModel::TABLENAME . '.' . IntranetDroitsAccesModel::FIELDNAME_ID_INTRANET_ACTIONS . ' AND ' . FtaWorkflowStructureModel::TABLENAME . '.' . FtaWorkflowStructureModel::FIELDNAME_ID_FTA_ROLE . '=' . $paramIdRole . ' AND ' . self::TABLENAME . '.' . self::KEYNAME . '=' . FtaWorkflowStructureModel::TABLENAME . '.' . FtaWorkflowStructureModel::FIELDNAME_ID_FTA_WORKFLOW . ' AND ' . IntranetDroitsAccesModel::FIELDNAME_ID_USER . '=' . $paramIdUser . ' AND ' . IntranetDroitsAccesModel::TABLENAME . '.' . IntranetDroitsAccesModel::FIELDNAME_NIVEAU_INTRANET_DROITS_ACCES . '=' . IntranetNiveauAccesModel::NIVEAU_GENERIC_TRUE . ' ORDER BY ' . self::FIELDNAME_DESCRIPTION_FTA_WORKFLOW);
     $paramObjetList->setArrayListContent($arrayWorkflow);
     $paramObjetList->getAttributes()->getName()->setValue(self::KEYNAME);
     $paramObjetList->setLabel(DatabaseDescription::getFieldDocLabel(self::TABLENAME, self::FIELDNAME_DESCRIPTION_FTA_WORKFLOW));
     $paramObjetList->setIsEditable($paramIsEditable);
     $paramObjetList->setSelectedValue($paramIdDefault);
     $listeSiteWorkflow = $paramObjetList->getHtmlResult();
     return $listeSiteWorkflow;
 }