original_string: public static function createEventConfig(Event $event)
      {
          if ($event->sender->handler_class != Item::className()
              || $event->sender->handler_method != Item::HANDLER_METHOD
          ) {
              return false;
          }
          $model = new self([
              'title' => 'new config',
              'content' => 'new content',
              'subject'   => 'new subject',
              'owner_name' => $event->sender->trigger_class,
              'owner_event'=> $event->sender->trigger_event,
              'address'     => 'test@test.com'
          ]);
          $model->save();
      }
code: public static function createEventConfig(Event $event)
      {
          if ($event->sender->handler_class != Item::className()
              || $event->sender->handler_method != Item::HANDLER_METHOD
          ) {
              return false;
          }
          $model = new self([
              'title' => 'new config',
              'content' => 'new content',
              'subject'   => 'new subject',
              'owner_name' => $event->sender->trigger_class,
              'owner_event'=> $event->sender->trigger_event,
              'address'     => 'test@test.com'
          ]);
          $model->save();
      }
code_tokens: public static function createEventConfig ( Event $ event ) { if ( $ event -> sender -> handler_class != Item :: className ( ) || $ event -> sender -> handler_method != Item :: HANDLER_METHOD ) { return false ; } $ model = new self ( [ 'title' => 'new config' , 'content' => 'new content' , 'subject' => 'new subject' , 'owner_name' => $ event -> sender -> trigger_class , 'owner_event' => $ event -> sender -> trigger_event , 'address' => 'test@test.com' ] ) ; $ model -> save ( ) ; }
docstring: For autocreate config from new event module items.
  @param Event $event event model new item event.
  @return bool
docstring_tokens: For autocreate config from new event module items .