# ablocks/2.9.0/includes/controls/zindex.php

aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder &amp; Animation Builder, version 2.9.0. 45 lines.

- Page: https://pluginprobe.com/plugins/ablocks/2.9.0/code/includes/controls/zindex.php
- Raw: https://pluginprobe.com/plugins/ablocks/2.9.0/raw/includes/controls/zindex.php
- Modified: 2024-05-29T14:22:36+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/ablocks/2.9.0/code/includes/controls/zindex.php#L10-L20`.

```php
<?php
namespace ABlocks\Controls;

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

use ABlocks\Classes\ControlBaseAbstract;

class Zindex extends ControlBaseAbstract {
	public static function get_attribute_default_value( $is_responsive = false ) {
		if ( $is_responsive ) {
			return [
				'zIndex' => '',
				'zIndexTablet' => '',
				'zIndexMobile' => '',
			];
		}
		return [
			'zIndex' => '',
		];
	}

	public static function get_attribute( $attributeName, $isResponsive = false ) {
		return [
			$attributeName => [
				'type' => 'object',
				'default' => self::get_attribute_default_value( $isResponsive ),
			]
		];
	}

	public static function get_css( $attribute_value, $property = '', $device = '' ) {
		$default_attar_value = self::get_attribute_default_value( (bool) $device );
		$value = wp_parse_args( $attribute_value, $default_attar_value );
		$css = [];
		if ( $value[ 'zIndex' . $device ] ) {
			$css[ $property ] = $value[ 'zIndex' . $device ];
		}
		return $css;
	}


}

```
