当前位置: 首页>>代码示例>>PHP>>正文


PHP Settings::saveSetting方法代码示例

本文整理汇总了PHP中thebuggenie\core\framework\Settings::saveSetting方法的典型用法代码示例。如果您正苦于以下问题:PHP Settings::saveSetting方法的具体用法?PHP Settings::saveSetting怎么用?PHP Settings::saveSetting使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在thebuggenie\core\framework\Settings的用法示例。


在下文中一共展示了Settings::saveSetting方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: loadFixtures

 public static function loadFixtures(\thebuggenie\core\entities\Scope $scope)
 {
     $scope_id = $scope->getID();
     $admin_group = new \thebuggenie\core\entities\Group();
     $admin_group->setName('Administrators');
     $admin_group->setScope($scope);
     $admin_group->save();
     \thebuggenie\core\framework\Settings::saveSetting('admingroup', $admin_group->getID(), 'core', $scope_id);
     $user_group = new \thebuggenie\core\entities\Group();
     $user_group->setName('Regular users');
     $user_group->setScope($scope);
     $user_group->save();
     \thebuggenie\core\framework\Settings::saveSetting('defaultgroup', $user_group->getID(), 'core', $scope_id);
     $guest_group = new \thebuggenie\core\entities\Group();
     $guest_group->setName('Guests');
     $guest_group->setScope($scope);
     $guest_group->save();
     // Set up initial users, and their permissions
     if ($scope->isDefault()) {
         list($guestuser_id, $adminuser_id) = \thebuggenie\core\entities\User::loadFixtures($scope, $admin_group, $user_group, $guest_group);
         tables\UserScopes::getTable()->addUserToScope($guestuser_id, $scope->getID(), $guest_group->getID(), true);
         tables\UserScopes::getTable()->addUserToScope($adminuser_id, $scope->getID(), $admin_group->getID(), true);
     } else {
         $default_scope_id = \thebuggenie\core\framework\Settings::getDefaultScopeID();
         $default_user_id = (int) \thebuggenie\core\framework\Settings::get(\thebuggenie\core\framework\Settings::SETTING_DEFAULT_USER_ID, 'core', $default_scope_id);
         tables\UserScopes::getTable()->addUserToScope($default_user_id, $scope->getID(), $user_group->getID(), true);
         tables\UserScopes::getTable()->addUserToScope(1, $scope->getID(), $admin_group->getID());
         \thebuggenie\core\framework\Settings::saveSetting(\thebuggenie\core\framework\Settings::SETTING_DEFAULT_USER_ID, $default_user_id, 'core', $scope->getID());
     }
     tables\Permissions::getTable()->loadFixtures($scope, $admin_group->getID(), $guest_group->getID());
 }
开发者ID:founderio,项目名称:thebuggenie,代码行数:31,代码来源:Group.php

示例2: loadFixtures

 public static function loadFixtures(\thebuggenie\core\entities\Scope $scope)
 {
     $scheme = new \thebuggenie\core\entities\WorkflowScheme();
     $scheme->setScope($scope);
     $scheme->setName("Default workflow scheme");
     $scheme->setDescription("This is the default workflow scheme. It is used by all projects with no specific workflow scheme selected. This scheme cannot be edited or removed.");
     $scheme->save();
     \thebuggenie\core\framework\Settings::saveSetting(\thebuggenie\core\framework\Settings::SETTING_DEFAULT_WORKFLOWSCHEME, $scheme->getID(), 'core', $scope->getID());
 }
开发者ID:RTechSoft,项目名称:thebuggenie,代码行数:9,代码来源:WorkflowScheme.php

示例3: loadFixtures

 public static function loadFixtures(\thebuggenie\core\entities\Scope $scope)
 {
     $scheme = new IssuetypeScheme();
     $scheme->setScope($scope->getID());
     $scheme->setName("Default issuetype scheme");
     $scheme->setDescription("This is the default issuetype scheme. It is used by all projects with no specific issuetype scheme selected. This scheme cannot be edited or removed.");
     $scheme->save();
     framework\Settings::saveSetting(framework\Settings::SETTING_DEFAULT_ISSUETYPESCHEME, $scheme->getID(), 'core', $scope->getID());
     foreach (Issuetype::getAll() as $issuetype) {
         $scheme->setIssuetypeEnabled($issuetype);
         if ($issuetype->getIcon() == 'developer_report') {
             $scheme->setIssuetypeRedirectedAfterReporting($issuetype, false);
         }
         if (in_array($issuetype->getIcon(), array('task', 'developer_report', 'idea'))) {
             $scheme->setIssuetypeReportable($issuetype, false);
         }
     }
     return $scheme;
 }
开发者ID:founderio,项目名称:thebuggenie,代码行数:19,代码来源:IssuetypeScheme.php

示例4: do_execute

 public function do_execute()
 {
     $this->cliEcho("\n");
     $this->cliEcho("Revert authentication backend\n", 'white', 'bold');
     $this->cliEcho("This command is useful if you've managed to lock yourself.\n");
     $this->cliEcho("out due to an authentication backend change gone bad.\n\n");
     if (\thebuggenie\core\framework\Settings::getAuthenticationBackend() == 'tbg' || \thebuggenie\core\framework\Settings::getAuthenticationBackend() == null) {
         $this->cliEcho("You are currently using the default authentication backend.\n\n");
     } else {
         $this->cliEcho("Please type 'yes' if you want to revert to the default authentication backend: ");
         $this->cliEcho("\n");
         if ($this->getInput() == 'yes') {
             \thebuggenie\core\framework\Settings::saveSetting(\thebuggenie\core\framework\Settings::SETTING_AUTH_BACKEND, 'tbg');
             $this->cliEcho("Authentication backend reverted.\n\n");
         } else {
             $this->cliEcho("No changes made.\n\n");
         }
     }
 }
开发者ID:founderio,项目名称:thebuggenie,代码行数:19,代码来源:RevertAuthBackend.php

示例5: _upgradeFrom3dot2

 protected function _upgradeFrom3dot2(framework\Request $request)
 {
     set_time_limit(0);
     \thebuggenie\core\entities\tables\Milestones::getTable()->upgrade(\thebuggenie\core\modules\installation\upgrade_32\TBGMilestone::getB2DBTable());
     \thebuggenie\core\entities\tables\Projects::getTable()->upgrade(\thebuggenie\core\modules\installation\upgrade_32\TBGProjectsTable::getTable());
     \thebuggenie\core\entities\tables\Log::getTable()->upgrade(\thebuggenie\core\modules\installation\upgrade_32\TBGLogTable::getTable());
     \thebuggenie\core\entities\tables\Users::getTable()->upgrade(\thebuggenie\core\modules\installation\upgrade_32\TBGUsersTable::getTable());
     \thebuggenie\core\entities\tables\Issues::getTable()->upgrade(\thebuggenie\core\modules\installation\upgrade_32\TBGIssuesTable::getTable());
     \thebuggenie\core\entities\tables\Workflows::getTable()->upgrade(\thebuggenie\core\modules\installation\upgrade_32\TBGWorkflowsTable::getTable());
     \thebuggenie\core\entities\tables\IssueSpentTimes::getTable()->upgrade(\thebuggenie\core\modules\installation\upgrade_32\TBGIssueSpentTimesTable::getTable());
     \thebuggenie\core\entities\tables\Comments::getTable()->upgrade(\thebuggenie\core\modules\installation\upgrade_32\TBGCommentsTable::getTable());
     \thebuggenie\core\entities\tables\SavedSearches::getTable()->upgrade(\thebuggenie\core\modules\installation\upgrade_32\TBGSavedSearchesTable::getTable());
     \thebuggenie\core\entities\tables\Settings::getTable()->upgrade(\thebuggenie\core\modules\installation\upgrade_32\TBGSettingsTable::getTable());
     \thebuggenie\core\entities\tables\Notifications::getTable()->upgrade(\thebuggenie\core\modules\installation\upgrade_32\TBGNotificationsTable::getTable());
     \thebuggenie\core\entities\tables\Permissions::getTable()->upgrade(\thebuggenie\core\modules\installation\upgrade_32\TBGPermissionsTable::getTable());
     \thebuggenie\core\entities\Dashboard::getB2DBTable()->create();
     \thebuggenie\core\entities\DashboardView::getB2DBTable()->upgrade(\thebuggenie\core\modules\installation\upgrade_32\TBGDashboardViewsTable::getTable());
     \thebuggenie\core\entities\ApplicationPassword::getB2DBTable()->create();
     \thebuggenie\core\entities\NotificationSetting::getB2DBTable()->create();
     $transaction = \b2db\Core::startTransaction();
     // Upgrade user passwords
     switch ($request['upgrade_passwords']) {
         case 'manual':
             $password = $request['manual_password'];
             foreach (\thebuggenie\core\entities\tables\Users::getTable()->selectAll() as $user) {
                 $user->setPassword($password);
                 $user->save();
             }
             break;
         case 'auto':
             $field = $request['upgrade_passwords_pick'] == 'username' ? 'username' : 'email';
             foreach (\thebuggenie\core\entities\tables\Users::getTable()->selectAll() as $user) {
                 if ($field == 'username' && trim($user->getUsername())) {
                     $user->setPassword(trim($user->getUsername()));
                     $user->save();
                 } elseif ($field == 'email' && trim($user->getEmail())) {
                     $user->setPassword(trim($user->getEmail()));
                     $user->save();
                 }
             }
             break;
     }
     $adminuser = \thebuggenie\core\entities\User::getB2DBTable()->selectById(1);
     $adminuser->setPassword($request['admin_password']);
     $adminuser->save();
     // Add new settings
     framework\Settings::saveSetting(framework\Settings::SETTING_SERVER_TIMEZONE, 'core', date_default_timezone_get(), 0, 1);
     foreach ($request->getParameter('status') as $scope_id => $status_id) {
         $scope = \thebuggenie\core\entities\tables\Scopes::getTable()->selectById((int) $scope_id);
         if ($scope instanceof \thebuggenie\core\entities\Scope) {
             $epic = new \thebuggenie\core\entities\Issuetype();
             $epic->setName('Epic');
             $epic->setIcon('epic');
             $epic->setDescription('Issue type suited for entering epics');
             $epic->setScope($scope_id);
             $epic->save();
             framework\Settings::saveSetting('issuetype_epic', $epic->getID(), 'core', $scope_id);
             foreach (\thebuggenie\core\entities\tables\Workflows::getTable()->getAll((int) $scope_id) as $workflow) {
                 $transition = new \thebuggenie\core\entities\WorkflowTransition();
                 $steps = $workflow->getSteps();
                 $step = array_shift($steps);
                 $step->setLinkedStatusID((int) $status_id);
                 $step->save();
                 $transition->setOutgoingStep($step);
                 $transition->setName('Issue created');
                 $transition->setWorkflow($workflow);
                 $transition->setScope($scope);
                 $transition->setDescription('This is the initial transition for issues using this workflow');
                 $transition->save();
                 $workflow->setInitialTransition($transition);
                 $workflow->save();
             }
             \thebuggenie\core\entities\ActivityType::loadFixtures($scope);
         }
     }
     $transaction->commitAndEnd();
     framework\Context::finishUpgrading();
     foreach (framework\Context::getModules() as $module) {
         $module->upgrade();
     }
     $this->upgrade_complete = true;
 }
开发者ID:JonathanRH,项目名称:thebuggenie,代码行数:82,代码来源:Main.php

示例6: setKeyboardNavigationEnabled

 public function setKeyboardNavigationEnabled($value = true)
 {
     if (!$value) {
         framework\Settings::saveSetting(framework\Settings::SETTING_USER_KEYBOARD_NAVIGATION, false, 'core', null, $this->getID());
     } else {
         framework\Settings::deleteSetting(framework\Settings::SETTING_USER_KEYBOARD_NAVIGATION, 'core', null, $this->getID());
     }
 }
开发者ID:underblaze,项目名称:thebuggenie-4.1.0,代码行数:8,代码来源:User.php

示例7: do_execute


//.........这里部分代码省略.........
                     $this->cliEcho("Permission denied when trying to save the [main folder]/thebuggenie/.user.ini\n", 'red', 'bold');
                     $this->cliEcho("You will have to set up the .user.ini file yourself. See the README file for more information.\n", 'white', 'bold');
                     $this->cliEcho('Please note: ', 'white', 'bold');
                     $this->cliEcho("If you're using PHP-FPM, The Bug Genie might not function properly until the .user.ini file is properly set up\n");
                 } else {
                     $content = file_get_contents(THEBUGGENIE_CORE_PATH . 'templates/htaccess.template');
                     file_put_contents(THEBUGGENIE_PATH . 'thebuggenie/.user.ini', $content);
                     if (file_get_contents(THEBUGGENIE_PATH . 'thebuggenie/.user.ini') != $content) {
                         $this->cliEcho("Permission denied when trying to save the [main folder]/thebuggenie/.user.ini\n", 'red', 'bold');
                         $this->cliEcho("You will have to set up the .user.ini file yourself. See the README file for more information.\n", 'white', 'bold');
                         $this->cliEcho('Please note: ', 'white', 'bold');
                         $this->cliEcho("If you're using PHP-FPM, The Bug Genie might not function properly until the .user.ini file is properly set up\n");
                     } else {
                         $this->cliEcho("The .user.ini file was successfully set up...\n", 'green', 'bold');
                     }
                 }
             } else {
                 $this->cliEcho("Skipping .htaccess and .user.ini auto-setup.");
             }
             if ($this->getProvidedArgument('setup_htaccess') != 'yes') {
                 $this->cliEcho("Press ENTER to continue ... ");
                 $this->pressEnterToContinue();
                 $this->cliEcho("\n");
             }
             $this->cliEcho("\n");
             $this->cliEcho("Creating tables ...\n", 'white', 'bold');
             $b2db_entities_path = THEBUGGENIE_CORE_PATH . 'entities' . DS . 'tables' . DS;
             $tables_created = array();
             foreach (scandir($b2db_entities_path) as $tablefile) {
                 if (in_array($tablefile, array('.', '..'))) {
                     continue;
                 }
                 if (($tablename = mb_substr($tablefile, 0, mb_strpos($tablefile, '.'))) != '') {
                     $tablename = "\\thebuggenie\\core\\entities\\tables\\{$tablename}";
                     $reflection = new \ReflectionClass($tablename);
                     $docblock = $reflection->getDocComment();
                     $annotationset = new \b2db\AnnotationSet($docblock);
                     if ($annotationset->hasAnnotation('Table')) {
                         \b2db\Core::getTable($tablename)->create();
                         \b2db\Core::getTable($tablename)->createIndexes();
                         $tables_created[] = $tablename;
                     }
                 }
             }
             $this->cliEcho("\n");
             $this->cliEcho("All tables successfully created...\n\n", 'green', 'bold');
             $this->cliEcho("Setting up initial scope... \n", 'white', 'bold');
             \thebuggenie\core\framework\Context::reinitializeI18n('en_US');
             $scope = new \thebuggenie\core\entities\Scope();
             $scope->setName('The default scope');
             $scope->addHostname('*');
             $scope->setEnabled();
             \thebuggenie\core\framework\Context::setScope($scope);
             $scope->save();
             \thebuggenie\core\framework\Settings::saveSetting('language', 'en_US');
             $this->cliEcho("Initial scope setup successfully... \n\n", 'green', 'bold');
             $this->cliEcho("Setting up modules... \n", 'white', 'bold');
             try {
                 foreach (array('publish', 'mailing', 'vcs_integration') as $module) {
                     $this->cliEcho("Installing {$module}... \n");
                     \thebuggenie\core\entities\Module::installModule($module);
                 }
                 $this->cliEcho("\n");
                 $this->cliEcho("All modules installed successfully...\n", 'green', 'bold');
                 $this->cliEcho("\n");
                 $this->cliEcho("Finishing installation... \n", 'white', 'bold');
                 $installed_string = \thebuggenie\core\framework\Settings::getMajorVer() . '.' . \thebuggenie\core\framework\Settings::getMinorVer() . ', installed ' . date('d.m.Y H:i');
                 if (file_exists(THEBUGGENIE_PATH . 'installed') && !is_writable(THEBUGGENIE_PATH . 'installed') || !file_exists(THEBUGGENIE_PATH . 'installed') && !is_writable(THEBUGGENIE_PATH)) {
                     $this->cliEcho("\n");
                     $this->cliEcho("Could not create the 'installed' file.\n", 'red', 'bold');
                     $this->cliEcho("Please create the file ");
                     $this->cliEcho(THEBUGGENIE_PATH . "installed\n", 'white', 'bold');
                     $this->cliEcho("with the following line inside:\n");
                     $this->cliEcho($installed_string, 'blue', 'bold');
                     $this->cliEcho("\n");
                     $this->cliEcho("This can be done by running the following command when installation has finished:\n");
                     $this->cliEcho('echo "' . $installed_string . '" > ' . THEBUGGENIE_PATH . 'installed', 'white', 'bold');
                     $this->cliEcho("\n");
                     $this->cliEcho("Press ENTER to continue ... ");
                     $this->pressEnterToContinue();
                     $this->cliEcho("\n");
                     $this->cliEcho("\n");
                 } else {
                     file_put_contents(THEBUGGENIE_PATH . 'installed', $installed_string);
                 }
                 $this->cliEcho("The installation was completed successfully!\n", 'green', 'bold');
                 $this->cliEcho("\nTo use The Bug Genie, access http://example.com" . $url_subdir . "index.php with a web-browser.\n");
                 $this->cliEcho("The default username is ") . $this->cliEcho('Administrator') . $this->cliEcho(' and the password is ') . $this->cliEcho('admin');
                 $this->cliEcho("\n\nFor support, please visit ") . $this->cliEcho('http://www.thebuggenie.com/', 'blue', 'underline');
                 $this->cliEcho("\n");
             } catch (\Exception $e) {
                 throw new \Exception("Could not install the {$module} module:\n" . $e->getMessage());
             }
         }
     } catch (\Exception $e) {
         $this->cliEcho("\n\nThe installation was interrupted\n", 'red');
         $this->cliEcho($e->getMessage() . "\n");
     }
     $this->cliEcho("\n");
 }
开发者ID:RTechSoft,项目名称:thebuggenie,代码行数:101,代码来源:Install.php

示例8: setDesktopNotificationsNewTabEnabled

 public function setDesktopNotificationsNewTabEnabled($value = true)
 {
     if ($value) {
         framework\Settings::saveSetting(framework\Settings::SETTING_USER_DESKTOP_NOTIFICATIONS_NEW_TAB, true, 'core', null, $this->getID());
     } else {
         framework\Settings::deleteSetting(framework\Settings::SETTING_USER_DESKTOP_NOTIFICATIONS_NEW_TAB, 'core', null, $this->getID());
     }
 }
开发者ID:founderio,项目名称:thebuggenie,代码行数:8,代码来源:User.php

示例9: runSiteIcons

 public function runSiteIcons(framework\Request $request)
 {
     if ($this->getAccessLevel($request['section'], 'core') == framework\Settings::ACCESS_FULL) {
         if ($request->isPost()) {
             switch ($request['small_icon_action']) {
                 case 'upload_file':
                     $file = $request->handleUpload('small_icon');
                     framework\Settings::saveSetting(framework\Settings::SETTING_FAVICON_TYPE, framework\Settings::APPEARANCE_FAVICON_CUSTOM);
                     framework\Settings::saveSetting(framework\Settings::SETTING_FAVICON_ID, $file->getID());
                     break;
                 case 'clear_file':
                     framework\Settings::saveSetting(framework\Settings::SETTING_FAVICON_TYPE, framework\Settings::APPEARANCE_FAVICON_THEME);
                     break;
             }
             switch ($request['large_icon_action']) {
                 case 'upload_file':
                     $file = $request->handleUpload('large_icon');
                     framework\Settings::saveSetting(framework\Settings::SETTING_HEADER_ICON_TYPE, framework\Settings::APPEARANCE_HEADER_CUSTOM);
                     framework\Settings::saveSetting(framework\Settings::SETTING_HEADER_ICON_ID, $file->getID());
                     break;
                 case 'clear_file':
                     framework\Settings::saveSetting(framework\Settings::SETTING_HEADER_ICON_TYPE, framework\Settings::APPEARANCE_HEADER_THEME);
                     break;
             }
         }
         $route = framework\Context::getRouting()->generate('configure_settings');
         if ($request->isAjaxCall()) {
             return $this->renderJSON(array('forward' => $route));
         } else {
             $this->forward($route);
         }
     }
     return $this->forward403($this->getI18n()->__("You don't have access to perform this action"));
 }
开发者ID:nrensen,项目名称:thebuggenie,代码行数:34,代码来源:Main.php

示例10: loadFixtures

 public static function loadFixtures(\thebuggenie\core\entities\Scope $scope)
 {
     $scope_id = $scope->getID();
     $bug_report = new \thebuggenie\core\entities\Issuetype();
     $bug_report->setName('Bug report');
     $bug_report->setIcon('bug_report');
     $bug_report->setScope($scope_id);
     $bug_report->setDescription('Have you discovered a bug in the application, or is something not working as expected?');
     $bug_report->save();
     \thebuggenie\core\framework\Settings::saveSetting('defaultissuetypefornewissues', $bug_report->getID(), 'core', $scope_id);
     \thebuggenie\core\framework\Settings::saveSetting('issuetype_bug_report', $bug_report->getID(), 'core', $scope_id);
     $feature_request = new \thebuggenie\core\entities\Issuetype();
     $feature_request->setName('Feature request');
     $feature_request->setIcon('feature_request');
     $feature_request->setDescription('Are you missing some specific feature, or is your favourite part of the application a bit lacking?');
     $feature_request->setScope($scope_id);
     $feature_request->save();
     \thebuggenie\core\framework\Settings::saveSetting('issuetype_feature_request', $feature_request->getID(), 'core', $scope_id);
     $enhancement = new \thebuggenie\core\entities\Issuetype();
     $enhancement->setName('Enhancement');
     $enhancement->setIcon('enhancement');
     $enhancement->setDescription('Have you found something that is working in a way that could be improved?');
     $enhancement->setScope($scope_id);
     $enhancement->save();
     \thebuggenie\core\framework\Settings::saveSetting('issuetype_enhancement', $enhancement->getID(), 'core', $scope_id);
     $task = new \thebuggenie\core\entities\Issuetype();
     $task->setName('Task');
     $task->setIcon('task');
     $task->setIsTask();
     $task->setScope($scope_id);
     $task->save();
     \thebuggenie\core\framework\Settings::saveSetting('issuetype_task', $task->getID(), 'core', $scope_id);
     $user_story = new \thebuggenie\core\entities\Issuetype();
     $user_story->setName('User story');
     $user_story->setIcon('developer_report');
     $user_story->setDescription('Doing it Agile-style. Issue type perfectly suited for entering user stories');
     $user_story->setScope($scope_id);
     $user_story->save();
     \thebuggenie\core\framework\Settings::saveSetting('issuetype_user_story', $user_story->getID(), 'core', $scope_id);
     $epic = new \thebuggenie\core\entities\Issuetype();
     $epic->setName('Epic');
     $epic->setIcon('epic');
     $epic->setDescription('Issue type suited for entering epics');
     $epic->setScope($scope_id);
     $epic->save();
     \thebuggenie\core\framework\Settings::saveSetting('issuetype_epic', $epic->getID(), 'core', $scope_id);
     $idea = new \thebuggenie\core\entities\Issuetype();
     $idea->setName('Idea');
     $idea->setIcon('idea');
     $idea->setDescription('Express yourself - share your ideas with the rest of the team!');
     $idea->setScope($scope_id);
     $idea->save();
     \thebuggenie\core\framework\Settings::saveSetting('issuetype_idea', $idea->getID(), 'core', $scope_id);
     return array($bug_report->getID(), $feature_request->getID(), $enhancement->getID(), $task->getID(), $user_story->getID(), $idea->getID(), $epic->getID());
 }
开发者ID:pkdevboxy,项目名称:thebuggenie,代码行数:55,代码来源:Issuetype.php

示例11: saveSetting

 public function saveSetting($setting, $value, $uid = 0, $scope = null)
 {
     $scope = $scope === null ? framework\Context::getScope()->getID() : $scope;
     return framework\Settings::saveSetting($setting, $value, $this->getName(), $scope, $uid);
 }
开发者ID:pkdevboxy,项目名称:thebuggenie,代码行数:5,代码来源:Module.php

示例12: runSaveColumnSettings

 public function runSaveColumnSettings(framework\Request $request)
 {
     framework\Settings::saveSetting('search_scs_' . $request['template'], join(',', $request['columns']));
     return $this->renderJSON(array('columns' => 'ok'));
 }
开发者ID:RTechSoft,项目名称:thebuggenie,代码行数:5,代码来源:Actions.php

示例13: loadFixtures

 public static function loadFixtures(\thebuggenie\core\entities\Scope $scope)
 {
     $workflow = new \thebuggenie\core\entities\Workflow();
     $workflow->setName("Default workflow");
     $workflow->setDescription("This is the default workflow. It is used by all projects with no specific workflow selected, and for issue types with no specific workflow specified. This workflow cannot be edited or removed.");
     $workflow->setScope($scope->getID());
     $workflow->save();
     \thebuggenie\core\framework\Settings::saveSetting(\thebuggenie\core\framework\Settings::SETTING_DEFAULT_WORKFLOW, $workflow->getID(), 'core', $scope->getID());
     WorkflowStep::loadFixtures($scope, $workflow);
 }
开发者ID:founderio,项目名称:thebuggenie,代码行数:10,代码来源:Workflow.php

示例14: loadFixtures

 public static function loadFixtures(Scope $scope)
 {
     $available = new Userstate();
     $available->setIsOnline();
     $available->setName('Available');
     $available->save();
     $offline = new Userstate();
     $offline->setIsUnavailable();
     $offline->setName('Offline');
     $offline->save();
     $busy = new Userstate();
     $busy->setIsUnavailable();
     $busy->setIsOnline();
     $busy->setName('Busy');
     $busy->save();
     $unavailable = new Userstate();
     $unavailable->setIsUnavailable();
     $unavailable->setIsOnline();
     $unavailable->setName('Unavailable');
     $unavailable->save();
     $in_a_meeting = new Userstate();
     $in_a_meeting->setIsUnavailable();
     $in_a_meeting->setIsInMeeting();
     $in_a_meeting->setName('In a meeting');
     $in_a_meeting->save();
     $coding = new Userstate();
     $coding->setIsUnavailable();
     $coding->setIsBusy();
     $coding->setIsOnline();
     $coding->setName('Coding');
     $coding->save();
     $coffee = new Userstate();
     $coffee->setIsUnavailable();
     $coffee->setIsBusy();
     $coffee->setIsOnline();
     $coffee->setName('On coffee break');
     $away = new Userstate();
     $away->setIsUnavailable();
     $away->setIsOnline();
     $away->setIsBusy();
     $away->setIsAbsent();
     $away->setName('Away');
     $away->save();
     $vacation = new Userstate();
     $vacation->setIsUnavailable();
     $vacation->setIsBusy();
     $vacation->setIsAbsent();
     $vacation->setName('On vacation');
     $vacation->save();
     \thebuggenie\core\framework\Settings::saveSetting(\thebuggenie\core\framework\Settings::SETTING_ONLINESTATE, $available->getID(), 'core', $scope->getID());
     \thebuggenie\core\framework\Settings::saveSetting(\thebuggenie\core\framework\Settings::SETTING_OFFLINESTATE, $offline->getID(), 'core', $scope->getID());
     \thebuggenie\core\framework\Settings::saveSetting(\thebuggenie\core\framework\Settings::SETTING_AWAYSTATE, $away->getID(), 'core', $scope->getID());
 }
开发者ID:pkdevboxy,项目名称:thebuggenie,代码行数:53,代码来源:Userstate.php


注:本文中的thebuggenie\core\framework\Settings::saveSetting方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。