getScriptingEventsWithScope() public static method

public static getScriptingEventsWithScope ( )
Example #1
0
 private function getEventsList()
 {
     $events = EVENT_TYPE::getScriptingEventsWithScope();
     $envId = null;
     if ($this->request->getScope() == WebhookConfig::SCOPE_ENVIRONMENT) {
         $envId = (int) $this->getEnvironmentId(true);
     }
     //Temporary added new events like this, workign on events refactoring
     $events['HostInitFailed'] = ['name' => 'HostInitFailed', 'description' => 'Instance was unable to initialize', 'scope' => 'scalr'];
     $events['InstanceLaunchFailed'] = ['name' => 'InstanceLaunchFailed', 'description' => 'Scalr failed to launch instance due to cloud error', 'scope' => 'scalr'];
     $events = array_merge($events, \Scalr\Model\Entity\EventDefinition::getList($this->user->getAccountId(), $envId));
     return $events;
 }
Example #2
0
 public static function getScriptingData($accountId, $envId)
 {
     return ['events' => array_merge(\EVENT_TYPE::getScriptingEventsWithScope(), EventDefinition::getList($accountId, $envId)), 'scripts' => static::getList($accountId, $envId)];
 }