protected function atLeastOneExport( array $chapters ) {

		foreach ( $chapters as $key => $val ) {
			if ( is_array( $val ) ) {
				$found = $this->atLeastOneExport( $val );
				if ( $found ) {
					return true;
				} else {
					continue;
				}
			} elseif ( 'export' === (string) $key && $val ) {
				return true;
			}
		}

		return false;
	}
protected function atLeastOneExport( array $chapters ) {

		foreach ( $chapters as $key => $val ) {
			if ( is_array( $val ) ) {
				$found = $this->atLeastOneExport( $val );
				if ( $found ) {
					return true;
				} else {
					continue;
				}
			} elseif ( 'export' === (string) $key && $val ) {
				return true;
			}
		}

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

@param array $chapters

@return bool
Does array of chapters have at least one export? Recursive .