本文整理汇总了PHP中Activity::getPriority方法的典型用法代码示例。如果您正苦于以下问题:PHP Activity::getPriority方法的具体用法?PHP Activity::getPriority怎么用?PHP Activity::getPriority使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Activity
的用法示例。
在下文中一共展示了Activity::getPriority方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testGetPriority
/**
* Tests Activity->getPriority()
*/
public function testGetPriority()
{
$priority = 1;
$this->Activity->setPriority($priority);
$this->assertEquals($priority, $this->Activity->getPriority());
}
示例2: showActivity
public function showActivity(Activity $act, $idUser)
{
$html = "";
$html .= '
<div class="row">
<div class="col-md-12">
<div class="center" id="successSub">
</div>
<div class="alert alert-info center" role="alert">
<div class="row">
<div class="col-md-6">
Priorité : ' . $act->getPriority() . '
</div>
<div class="col-md-6">
';
if ($act->getIsPublic()) {
$html .= 'Activité publique';
} else {
$html .= 'Activité privée';
}
$html .= '
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-8">
<h1>' . $act->getIdActivity() . ' - ' . $act->getTitle() . ' à ' . $act->getGeoPos() . '</h1>
</div>
<div class="col-md-4">
<div class="row">
<div class="col-md-12">
<div class="notationDiv">
<p>Notation : </p>
<script src="js/ListeEtoile.js"></script>
<div id="notation">
<script type="text/javascript">
CreateListeEtoile(\'notation\',5);
</script>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12 center">
';
//if the event is private the button is disabled
if ($act->getIsPossibleToSubscribe()) {
$html .= '<button type="button" id="buttonInscriptionAct" data-idAct=' . $act->getIdActivity() . ' data-idUser=' . $idUser . ' class="btn btn-default">S\'inscrire</button>';
} else {
$html .= '<button type="button" class="btn btn-default" disabled="disabled">S\'inscrire</button>';
}
$html .= '
</div>
</div>
</div>
</div>
<div class="row marginBot">
<div class="col-md-12">
Du : ' . $act->getStartDate() . ' au ' . $act->getEndDate() . ' <br/>
De : ' . $act->getStartHour() . ' à ' . $act->getEndHour() . ' <br/>
<br/>
<h3>Description : </h3>
' . $act->getDescription() . '
</div>
</div>
<div class="row">
<div class="col-md-12">
<div id="showComment2">
</div>
</div>
</div>
';
echo $html;
}
示例3: modify
/**
* Update activity in database
* @param : Activity object
* @return : false if the update failed / else true
*/
public function modify(Activity $activity)
{
$sql = "UPDATE activite\n\t\t\tSET titre = :titre,\n\t\t\tdescription = :description,\n\t\t\tpositionGeographique = :positionGeographique,\n\t\t\ttype = :type,\n\t\t\tpriorite = :priorite,\n\t\t\tdateDebut = :dateDebut,\n\t\t\tdateFin = :dateFin,\n\t\t\tperiodicite = :periodicite,\n\t\t\tnbOccurence = :nbOccurence,\n\t\t\testEnPause = :estEnPause,\n\t\t\testPublic = :estPublic\n\t\t\tWHERE idActivite = :idActivite";
$req = $this->_db->prepare($sql);
$req->bindParam(':titre', $activity->getTitle(), PDO::PARAM_STR);
$req->bindParam(':description', $activity->getDescription(), PDO::PARAM_STR);
$req->bindParam(':positionGeographique', $activity->getGeoPos(), PDO::PARAM_STR);
$req->bindParam(':type', $activity->getType(), PDO::PARAM_STR);
$req->bindParam(':priorite', $activity->getPriority(), PDO::PARAM_STR);
$req->bindParam(':dateDebut', $activity->getStartDate(), PDO::PARAM_STR);
$req->bindParam(':dateFin', $activity->getEndDate(), PDO::PARAM_STR);
$req->bindParam(':periodicite', $activity->getPeriodic(), PDO::PARAM_STR);
$req->bindParam(':nbOccurence', $activity->getNbOccur(), PDO::PARAM_STR);
$req->bindParam(':estEnPause', $activity->getIsInBreak(), PDO::PARAM_STR);
$req->bindParam(':estPublic', $activity->getIsPublic(), PDO::PARAM_STR);
$req->execute();
$nbTupleObt = $req->rowCount();
$req->closeCursor();
if ($nbTupleObt < 1) {
return false;
}
return true;
}