Printer::prepareInputForAdd PHP Method

prepareInputForAdd() public method

public prepareInputForAdd ( $input )
    function prepareInputForAdd($input)
    {
        if (isset($input["id"]) && $input["id"] > 0) {
            $input["_oldID"] = $input["id"];
        }
        unset($input['id']);
        unset($input['withtemplate']);
        if (isset($input['init_pages_counter'])) {
            $input['init_pages_counter'] = intval($input['init_pages_counter']);
        } else {
            $input['init_pages_counter'] = 0;
        }
        if (isset($input['last_pages_counter'])) {
            $input['last_pages_counter'] = intval($input['last_pages_counter']);
        } else {
            $input['last_pages_counter'] = $input['init_pages_counter'];
        }
        return $input;
    }