Update docs
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace MageSail\Magesail\Plugin\Config\Structure;
|
||||
|
||||
use Magento\Config\Model\Config\Structure\Data;
|
||||
|
||||
/**
|
||||
* Drops {@code tab} on the {@code magesail} section in merged config data so {@see Structure::getTabs()}
|
||||
* never attaches it to the Stores → Configuration sidebar. The section remains in {@code sections} for
|
||||
* direct URLs ({@code section=magesail}) and CLI.
|
||||
*/
|
||||
class StripMagesailSectionTabFromConfigDataPlugin
|
||||
{
|
||||
/**
|
||||
* @param mixed $result
|
||||
* @return mixed
|
||||
*/
|
||||
public function afterGet(Data $subject, $result, $path = null, $default = null)
|
||||
{
|
||||
if ($path !== null || !is_array($result)) {
|
||||
return $result;
|
||||
}
|
||||
if (isset($result['sections']['magesail']['tab'])) {
|
||||
unset($result['sections']['magesail']['tab']);
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user