protected function setCurrentBlockProperty(Model\BlockInterface $block, $property, $current)
    {
        $layout = $block->getLayout();

        // Update the current device layout
        $currentDevice = $this->resolveCurrentDevice();
        $layout = array_replace_recursive($layout, [
            $currentDevice => [
                $property => $current,
            ],
        ]);

        // Clear the property for upper devices layouts if equals
        foreach ($this->resolveGreaterDevices() as $d) {
            if (isset($layout[$d]) && isset($layout[$d][$property]) && $layout[$d][$property] == $current) {
                unset($layout[$d][$property]);
            }
        }

        $block->setLayout($layout);
    }
protected function setCurrentBlockProperty(Model\BlockInterface $block, $property, $current)
    {
        $layout = $block->getLayout();

        // Update the current device layout
        $currentDevice = $this->resolveCurrentDevice();
        $layout = array_replace_recursive($layout, [
            $currentDevice => [
                $property => $current,
            ],
        ]);

        // Clear the property for upper devices layouts if equals
        foreach ($this->resolveGreaterDevices() as $d) {
            if (isset($layout[$d]) && isset($layout[$d][$property]) && $layout[$d][$property] == $current) {
                unset($layout[$d][$property]);
            }
        }

        $block->setLayout($layout);
    }
protected function setCurrentBlockProperty ( Model \ BlockInterface $ block , $ property , $ current ) { $ layout = $ block -> getLayout ( ) ; // Update the current device layout $ currentDevice = $ this -> resolveCurrentDevice ( ) ; $ layout = array_replace_recursive ( $ layout , [ $ currentDevice => [ $ property => $ current , ] , ] ) ; // Clear the property for upper devices layouts if equals foreach ( $ this -> resolveGreaterDevices ( ) as $ d ) { if ( isset ( $ layout [ $ d ] ) && isset ( $ layout [ $ d ] [ $ property ] ) && $ layout [ $ d ] [ $ property ] == $ current ) { unset ( $ layout [ $ d ] [ $ property ] ) ; } } $ block -> setLayout ( $ layout ) ; }
Cleans up the block layout property.

@param Model\BlockInterface $block
@param string               $property
@param int                  $current
Cleans up the block layout property .