Pressbooks\Modules\Export\Mpdf\Pdf::atLeastOneExport PHP Method

atLeastOneExport() protected method

Does array of chapters have at least one export? Recursive.
protected atLeastOneExport ( array $chapters ) : boolean
$chapters array
return boolean
    protected function atLeastOneExport(array $chapters)
    {
        foreach ($chapters as $key => $val) {
            if (is_array($val)) {
                if ($this->atLeastOneExport($val)) {
                    return true;
                }
            } elseif ('export' == (string) $key && $val) {
                return true;
            }
        }
        return false;
    }