src/Extension/BaseExtension.php
private function add_new_hooks()
    {

        // ADD New Actions
        foreach ($this->hooks as $hook => $method) {
            // check if its not installed
            if (!isset($this->current_hooks[$hook])) {
                $data = [
                    'class'     => $this->package,
                    'method'    => $method,
                    'hook'      => $hook,
                    'settings'  => serialize($this->settings()),
                    'priority'  => 10,
                    'version'   => $this->version,
                    'enabled'   => 'y',
                ];

                ee()->db->insert('extensions', $data);
            }
        }
    }
private function add_new_hooks()
    {

        // ADD New Actions
        foreach ($this->hooks as $hook => $method) {
            // check if its not installed
            if (!isset($this->current_hooks[$hook])) {
                $data = [
                    'class'     => $this->package,
                    'method'    => $method,
                    'hook'      => $hook,
                    'settings'  => serialize($this->settings()),
                    'priority'  => 10,
                    'version'   => $this->version,
                    'enabled'   => 'y',
                ];

                ee()->db->insert('extensions', $data);
            }
        }
    }
private function add_new_hooks ( ) { // ADD New Actions foreach ( $ this -> hooks as $ hook => $ method ) { // check if its not installed if ( ! isset ( $ this -> current_hooks [ $ hook ] ) ) { $ data = [ 'class' => $ this -> package , 'method' => $ method , 'hook' => $ hook , 'settings' => serialize ( $ this -> settings ( ) ) , 'priority' => 10 , 'version' => $ this -> version , 'enabled' => 'y' , ] ; ee ( ) -> db -> insert ( 'extensions' , $ data ) ; } } }
Add New Hooks.
Add New Hooks .