WordPress at Your Fingertips
function is not described

Automattic\WooCommerce\Blocks\BlockTypes

FeaturedCategory::get_classes() public WC 1.0

Get class names for the block container.

{} It's a method of the class: FeaturedCategory{}

No Hooks.

Return

String.

Usage

$FeaturedCategory = new FeaturedCategory();
$FeaturedCategory->get_classes( $attributes );
$attributes(array) (required)
Block attributes.
Default: empty array

Code of FeaturedCategory::get_classes() WC 5.7.0

public function get_classes( $attributes ) {
	$classes = array( 'wc-block-' . $this->block_name );

	if ( isset( $attributes['align'] ) ) {
		$classes[] = "align{$attributes['align']}";
	}

	if ( isset( $attributes['dimRatio'] ) && ( 0 !== $attributes['dimRatio'] ) ) {
		$classes[] = 'has-background-dim';

		if ( 50 !== $attributes['dimRatio'] ) {
			$classes[] = 'has-background-dim-' . 10 * round( $attributes['dimRatio'] / 10 );
		}
	}

	if ( isset( $attributes['contentAlign'] ) && 'center' !== $attributes['contentAlign'] ) {
		$classes[] = "has-{$attributes['contentAlign']}-content";
	}

	if ( isset( $attributes['overlayColor'] ) ) {
		$classes[] = "has-{$attributes['overlayColor']}-background-color";
	}

	if ( isset( $attributes['className'] ) ) {
		$classes[] = $attributes['className'];
	}

	return implode( ' ', $classes );
}