Skip to main content

HasImportType

Adds import flag for the current type (enable or check).

Namespace​

JobMetric\Typeify\Traits\HasImportType

Methods​

import(): static​

Enable import for the current type.

$postType->define('blog')->import();

Throws: TypeifyTypeNotMatchException when no type is selected.

hasImport(): bool​

Whether import is enabled for the current type.

$postType->type('blog');
if ($postType->hasImport()) {
// allow import for this type
}

Throws: TypeifyTypeNotMatchException when no type is selected.