Exemplo n.º 1
0
 /**
  * Gets an array of UserQuestionTag objects which contain a foreign key that references this object.
  *
  * If this collection has already been initialized with an identical Criteria, it returns the collection.
  * Otherwise if this Category has previously been saved, it will retrieve
  * related UserQuestionTags from storage. If this Category is new, it will return
  * an empty collection or the current collection, the criteria is ignored on a new object.
  *
  * @param      PropelPDO $con
  * @param      Criteria $criteria
  * @return     array UserQuestionTag[]
  * @throws     PropelException
  */
 public function getUserQuestionTags($criteria = null, PropelPDO $con = null)
 {
     if ($criteria === null) {
         $criteria = new Criteria(CategoryPeer::DATABASE_NAME);
     } elseif ($criteria instanceof Criteria) {
         $criteria = clone $criteria;
     }
     if ($this->collUserQuestionTags === null) {
         if ($this->isNew()) {
             $this->collUserQuestionTags = array();
         } else {
             $criteria->add(UserQuestionTagPeer::CATEGORY_ID, $this->id);
             UserQuestionTagPeer::addSelectColumns($criteria);
             $this->collUserQuestionTags = UserQuestionTagPeer::doSelect($criteria, $con);
         }
     } else {
         // criteria has no effect for a new object
         if (!$this->isNew()) {
             // the following code is to determine if a new query is
             // called for.  If the criteria is the same as the last
             // one, just return the collection.
             $criteria->add(UserQuestionTagPeer::CATEGORY_ID, $this->id);
             UserQuestionTagPeer::addSelectColumns($criteria);
             if (!isset($this->lastUserQuestionTagCriteria) || !$this->lastUserQuestionTagCriteria->equals($criteria)) {
                 $this->collUserQuestionTags = UserQuestionTagPeer::doSelect($criteria, $con);
             }
         }
     }
     $this->lastUserQuestionTagCriteria = $criteria;
     return $this->collUserQuestionTags;
 }
Exemplo n.º 2
0
      <div class="question-form-container">
        <p id="error" align="center" style="display:none;" class="cn-pricepermin"><em style="font-size:14px;color:red;line-height:20px;">Oops, you missed something!</em></p>
        <p class="question"><img src="<?php 
echo image_path('question-icon.png', false);
?>
" alt="Question" style="z-index:5;position:relative" width="45" height="44" /><input type="text" placeholder="Describe question in one sentence" id="question" value="<?php 
echo $sf_params->get('question');
?>
" name="question"/></p>
        
        <!--recent questions-->
            <?php 
$c = new Criteria();
$c->add(UserQuestionTagPeer::CATEGORY_ID, 1);
$c->add(UserQuestionTagPeer::USER_ID, $raykuUser->getId());
$userQuestionTags = UserQuestionTagPeer::doSelect($c);
if (count($userQuestionTags) > 0) {
    ?>
             <div id="dumpquestionrecent">
          <div id="recent-questions">
			  <h3>Recent Question Filters (<a href="#">?</a>):</h3>
			<input type="hidden" name="dummycount" id="dummycount" value="1" />
            <ul id="tags" >
              <?php 
    foreach ($userQuestionTags as $userQuestionTag) {
        ?>
              <li><img src="<?php 
        echo image_path('tag.jpg', false);
        ?>
" alt="tag" class="tag" width="10" height="10" /> 
                <!--<a href="#" style="a:hover{text-decoration:none;}" id="<?php 
Exemplo n.º 3
0
 /**
  * Retrieve multiple objects by pkey.
  *
  * @param      array $pks List of primary keys
  * @param      PropelPDO $con the connection to use
  * @throws     PropelException Any exceptions caught during processing will be
  *		 rethrown wrapped into a PropelException.
  */
 public static function retrieveByPKs($pks, PropelPDO $con = null)
 {
     if ($con === null) {
         $con = Propel::getConnection(UserQuestionTagPeer::DATABASE_NAME, Propel::CONNECTION_READ);
     }
     $objs = null;
     if (empty($pks)) {
         $objs = array();
     } else {
         $criteria = new Criteria(UserQuestionTagPeer::DATABASE_NAME);
         $criteria->add(UserQuestionTagPeer::ID, $pks, Criteria::IN);
         $objs = UserQuestionTagPeer::doSelect($criteria, $con);
     }
     return $objs;
 }