DNADesign\Elemental\Services\ElementTabProvider
Provides top-level CMS field tab names for any element that extends BaseElement
Note that this will be replaced by GraphQL form schema caching (see
http://github.com/silverstripe/silverstripe-admin/issues/627 ). This service may be removed without warning in a
minor release.
Synopsis
class ElementTabProvider
implements
Flushable
{
- // members
- private static bool $regenerate_on_flush = false;
- protected CacheInterface $cache;
- // methods
- public array getTabsForElement()
- public static void flush()
- public $this setCache()
- protected CacheInterface getCache()
- protected void generateAllTabs()
- protected array generateTabsForElement()
- protected string getCacheKey()
Hierarchy
Uses
- SilverStripe\Core\Config\Configurable
Implements
- SilverStripe\Core\Flushable
Members
private
- $regenerate_on_flush
—
DNADesign\Elemental\Services\bool
Set to true to refresh the tab cache on flush
protected
- $cache — Psr\SimpleCache\CacheInterface
Methods
protected
- generateAllTabs() — Identify and regenerate all tab names for all elemental blocks (and cache them)
- generateTabsForElement() — Generate top level tab names for the given element class (and cache them)
- getCache()
- getCacheKey() — Generate a valid cache key from the given element class.
public
- flush() — This function is triggered early in the request if the "flush" query parameter has been set. Each class that implements Flushable implements this function which looks after it's own specific flushing functionality.
- getTabsForElement() — Get the top level tab names for the given element class
- setCache()