Ejemplo n.º 1
0
 /**
  * Get the object of a category of issues using a slug.
  * @param  String $issueCategorySlug - the unique slug of the category of the issue
  * @return an expetcted object of a category of issues
  */
 private function getIssueCategoryObjectUsingSlug($issueCategorySlug)
 {
     $issueCategory = IssueCategory::findFirst(array('conditions' => 'issue_category_slug = ?1', 'bind' => array(1 => $issueCategorySlug)));
     return $issueCategory;
 }
Ejemplo n.º 2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getIssueCategories()
 {
     return $this->hasMany(IssueCategory::className(), ['project_id' => 'id']);
 }
Ejemplo n.º 3
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getIssueCategory()
 {
     return $this->hasOne(IssueCategory::className(), ['id' => 'issue_category_id']);
 }
Ejemplo n.º 4
0
 /**
  * The setter of the field issue_category_id.
  * @param IssueCategory $issueCategory - the category of the issue
  */
 public function setIssueCategory(IssueCategory $issueCategory)
 {
     if ($issueCategory == NULL) {
         throw new InvalidArgumentException('[Model\\Issue] Invalid Model\\IssueCategory.');
     }
     $this->issue_category_id = $issueCategory->getIssueCategoryId();
 }