src/ngrest/base/Plugin.php
public function onCollectServiceData($event)
    {
        if ($this->onBeforeCollectServiceData($event)) {
            $data = $this->serviceData($event);
            if (!empty($data)) {
                $event->sender->addNgRestServiceData($this->name, $data);
            }
        }
    }
public function onCollectServiceData($event)
    {
        if ($this->onBeforeCollectServiceData($event)) {
            $data = $this->serviceData($event);
            if (!empty($data)) {
                $event->sender->addNgRestServiceData($this->name, $data);
            }
        }
    }
public function onCollectServiceData ( $ event ) { if ( $ this -> onBeforeCollectServiceData ( $ event ) ) { $ data = $ this -> serviceData ( $ event ) ; if ( ! empty ( $ data ) ) { $ event -> sender -> addNgRestServiceData ( $ this -> name , $ data ) ; } } }
The ngrest services collector.

> The service event is async to the other events, which means the service event collects data before the the other events are called.

@param \luya\admin\ngrest\base\NgRestModel::EVENT_SERVICE_NGREST $event NgRestModel event EVENT_SERVICE_NGREST.
The ngrest services collector .