local/modules/Klikandpay/Klikandpay.php
/**
     * Method used just after the module activation and give the
     * possibility to create the tables used by the module.
     *
     * @param ConnectionInterface $con
     */
Method used just after the module activation and give the
possibility to create the tables used by the module.


Method used just after the module activation and give the possibility to create the tables used by the module .
public function postActivation(ConnectionInterface $con = null)
    {
        $database = new Database($con->getWrappedConnection());
        $database->insertSql(null, array(__DIR__ . '/Config/klikandpay.sql'));
        $module = $this->getModuleModel();
        if (ModuleImageQuery::create()->filterByModule($module)->count() == 0)
        {
            $this->deployImageFolder($module, sprintf('%s/images', __DIR__), $con);
        }
        if(null === ConfigQuery::read(self::KEY))
        {
            ConfigQuery::write(self::KEY, $this->keygen(40), false);
        }
    }
public function postActivation ( ConnectionInterface $ con = null ) { $ database = new Database ( $ con -> getWrappedConnection ( ) ) ; $ database -> insertSql ( null , array ( __DIR__ . '/Config/klikandpay.sql' ) ) ; $ module = $ this -> getModuleModel ( ) ; if ( ModuleImageQuery :: create ( ) -> filterByModule ( $ module ) -> count ( ) == 0 ) { $ this -> deployImageFolder ( $ module , sprintf ( '%s/images' , __DIR__ ) , $ con ) ; } if ( null === ConfigQuery :: read ( self :: KEY ) ) { ConfigQuery :: write ( self :: KEY , $ this -> keygen ( 40 ) , false ) ; } }
Method used just after the module activation and give the
 possibility to create the tables used by the module.
Method used just after the module activation and give the possibility to create the tables used by the module .
// Tables creation for the module /* insert the images from image folder if first module activation */ // Key used to secure the transaction