예제 #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;
 }
예제 #2
0
파일: Project.php 프로젝트: jacmoe/bugitor
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getIssueCategories()
 {
     return $this->hasMany(IssueCategory::className(), ['project_id' => 'id']);
 }
예제 #3
0
파일: Issue.php 프로젝트: jacmoe/bugitor
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getIssueCategory()
 {
     return $this->hasOne(IssueCategory::className(), ['id' => 'issue_category_id']);
 }
예제 #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();
 }