public function callbackApply(ManialinkInterface $manialink, $login, $entries, $args)
    {
        /** @var GridBuilder $grid */
        $grid = $manialink->getData('grid');
        $grid->updateDataCollection($entries); // update datacollection

        // build settings array from datacollection
        $settings = [];
        foreach ($grid->getDataCollection()->getAll() as $key => $value) {
            $settings[$value['name']] = $value['value'];
        }

        try {
            $this->factory->getConnection()->setModeScriptSettings($settings);
            $this->closeManialink($manialink);

        } catch (\Exception $ex) {
            // TODO this should use chat notification.
            $this->factory->getConnection()->chatSendServerMessage("error: ".$ex->getMessage());
            $this->console->writeln('$f00Error: $fff'.$ex->getMessage());
        }
    }
public function callbackApply(ManialinkInterface $manialink, $login, $entries, $args)
    {
        /** @var GridBuilder $grid */
        $grid = $manialink->getData('grid');
        $grid->updateDataCollection($entries); // update datacollection

        // build settings array from datacollection
        $settings = [];
        foreach ($grid->getDataCollection()->getAll() as $key => $value) {
            $settings[$value['name']] = $value['value'];
        }

        try {
            $this->factory->getConnection()->setModeScriptSettings($settings);
            $this->closeManialink($manialink);

        } catch (\Exception $ex) {
            // TODO this should use chat notification.
            $this->factory->getConnection()->chatSendServerMessage("error: ".$ex->getMessage());
            $this->console->writeln('$f00Error: $fff'.$ex->getMessage());
        }
    }
public function callbackApply ( ManialinkInterface $ manialink , $ login , $ entries , $ args ) { /** @var GridBuilder $grid */ $ grid = $ manialink -> getData ( 'grid' ) ; $ grid -> updateDataCollection ( $ entries ) ; // update datacollection // build settings array from datacollection $ settings = [ ] ; foreach ( $ grid -> getDataCollection ( ) -> getAll ( ) as $ key => $ value ) { $ settings [ $ value [ 'name' ] ] = $ value [ 'value' ] ; } try { $ this -> factory -> getConnection ( ) -> setModeScriptSettings ( $ settings ) ; $ this -> closeManialink ( $ manialink ) ; } catch ( \ Exception $ ex ) { // TODO this should use chat notification. $ this -> factory -> getConnection ( ) -> chatSendServerMessage ( "error: " . $ ex -> getMessage ( ) ) ; $ this -> console -> writeln ( '$f00Error: $fff' . $ ex -> getMessage ( ) ) ; } }
Callback for apply button

@param $login
@param $entries
@param $args
Callback for apply button