private function setStates()
    {
        $appID = App::getCurrentID();
        $complementID = self::getCurrentID();

        if (! is_null($this->states)) {
            $states = $this->getStatesFromFile();

            if ($this->stateChanged($states)) {
                $file = $this->getStatesFilePath();
                $states[$appID][$complementID] = $this->states;
                Json::arrayToFile($states, $file);
                Hook::doAction('Eliasis/Complement/after_set_states', $states);
            }
        }
    }
private function setStates()
    {
        $appID = App::getCurrentID();
        $complementID = self::getCurrentID();

        if (! is_null($this->states)) {
            $states = $this->getStatesFromFile();

            if ($this->stateChanged($states)) {
                $file = $this->getStatesFilePath();
                $states[$appID][$complementID] = $this->states;
                Json::arrayToFile($states, $file);
                Hook::doAction('Eliasis/Complement/after_set_states', $states);
            }
        }
    }
private function setStates ( ) { $ appID = App :: getCurrentID ( ) ; $ complementID = self :: getCurrentID ( ) ; if ( ! is_null ( $ this -> states ) ) { $ states = $ this -> getStatesFromFile ( ) ; if ( $ this -> stateChanged ( $ states ) ) { $ file = $ this -> getStatesFilePath ( ) ; $ states [ $ appID ] [ $ complementID ] = $ this -> states ; Json :: arrayToFile ( $ states , $ file ) ; Hook :: doAction ( 'Eliasis/Complement/after_set_states' , $ states ) ; } } }
Set complements states.

@uses \Eliasis\Framework\App::getCurrentID()
@uses \Eliasis\Complement\Complement::getCurrentID()
@uses \Josantonius\Json\Json::arrayToFile()
@uses \Josantonius\Hook\Hook::doAction()
Set complements states .