コード例 #1
0
ファイル: Category.php プロジェクト: RTechSoft/thebuggenie
 public static function loadFixtures(\thebuggenie\core\entities\Scope $scope)
 {
     $categories = array('General', 'Security', 'User interface');
     foreach ($categories as $name) {
         $category = new \thebuggenie\core\entities\Category();
         $category->setName($name);
         $category->setScope($scope);
         $category->save();
     }
 }
コード例 #2
0
ファイル: Category.php プロジェクト: pkdevboxy/thebuggenie
 public static function loadFixtures(\thebuggenie\core\entities\Scope $scope)
 {
     $categories = array('General', 'Security', 'User interface');
     $categories['General'] = '#FFFFFF';
     $categories['Security'] = '#C2F533';
     $categories['User interface'] = '#55CC55';
     foreach ($categories as $name => $color) {
         $category = new \thebuggenie\core\entities\Category();
         $category->setName($name);
         $category->setColor($name);
         $category->setScope($scope);
         $category->save();
     }
 }