public function set_order_master(\collection $collection, $bool)
    {
        $sql = "UPDATE basusr SET order_master = :master WHERE usr_id = :usr_id AND base_id = :base_id";

        $stmt = $this->app->getApplicationBox()->get_connection()->prepare($sql);
        $stmt->execute([
            ':master'    => $bool ? 1 : 0,
            ':usr_id'    => $this->user->getId(),
            ':base_id'   => $collection->get_base_id()
        ]);
        $stmt->closeCursor();

        return $this;
    }
public function set_order_master(\collection $collection, $bool)
    {
        $sql = "UPDATE basusr SET order_master = :master WHERE usr_id = :usr_id AND base_id = :base_id";

        $stmt = $this->app->getApplicationBox()->get_connection()->prepare($sql);
        $stmt->execute([
            ':master'    => $bool ? 1 : 0,
            ':usr_id'    => $this->user->getId(),
            ':base_id'   => $collection->get_base_id()
        ]);
        $stmt->closeCursor();

        return $this;
    }
public function set_order_master ( \ collection $ collection , $ bool ) { $ sql = "UPDATE basusr SET order_master = :master WHERE usr_id = :usr_id AND base_id = :base_id" ; $ stmt = $ this -> app -> getApplicationBox ( ) -> get_connection ( ) -> prepare ( $ sql ) ; $ stmt -> execute ( [ ':master' => $ bool ? 1 : 0 , ':usr_id' => $ this -> user -> getId ( ) , ':base_id' => $ collection -> get_base_id ( ) ] ) ; $ stmt -> closeCursor ( ) ; return $ this ; }
Sets the user as "order_master" on a collection

@param \collection $collection The collection to apply
@param Boolean     $bool       Wheter the user is order master or not

@return ACL
Sets the user as order_master on a collection