Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Protected Member Functions
Cache Class Reference
Inheritance diagram for Cache:
Container Container Template ContainerInterface Template ContextInterface AbstractBlock DataObject BlockInterface

Public Member Functions

 getFlushStorageUrl ()
 
 getFlushSystemUrl ()
 
- Public Member Functions inherited from Container
 getCreateUrl ()
 
 getGridHtml ()
 
 getAddButtonLabel ()
 
 getBackButtonLabel ()
 
 getHeaderCssClass ()
 
 getHeaderWidth ()
 
- Public Member Functions inherited from Container
 __construct (\Magento\Backend\Block\Widget\Context $context, array $data=[])
 
 addButton ($buttonId, $data, $level=0, $sortOrder=0, $region='toolbar')
 
 removeButton ($buttonId)
 
 updateButton ($buttonId, $key, $data)
 
 getHeaderText ()
 
 getHeaderCssClass ()
 
 getHeaderHtml ()
 
 hasFooterButtons ()
 
 canRender (Button\Item $item)
 
- Public Member Functions inherited from Template
 __construct (\Magento\Backend\Block\Template\Context $context, array $data=[])
 
 getFormKey ()
 
 isOutputEnabled ($moduleName=null)
 
 getAuthorization ()
 
 getToolbar ()
 
- Public Member Functions inherited from Template
 __construct (Template\Context $context, array $data=[])
 
 setTemplateContext ($templateContext)
 
 getTemplate ()
 
 setTemplate ($template)
 
 getTemplateFile ($template=null)
 
 getArea ()
 
 assign ($key, $value=null)
 
 fetchView ($fileName)
 
 getBaseUrl ()
 
 getObjectData (\Magento\Framework\DataObject $object, $key)
 
 getCacheKeyInfo ()
 
- Public Member Functions inherited from AbstractBlock
 __construct (\Magento\Framework\View\Element\Context $context, array $data=[])
 
 getJsLayout ()
 
 getRequest ()
 
 getParentBlock ()
 
 setLayout (\Magento\Framework\View\LayoutInterface $layout)
 
 getLayout ()
 
 setNameInLayout ($name)
 
 getChildNames ()
 
 setAttribute ($name, $value=null)
 
 setChild ($alias, $block)
 
 addChild ($alias, $block, $data=[])
 
 unsetChild ($alias)
 
 unsetCallChild ($alias, $callback, $result, $params)
 
 unsetChildren ()
 
 getChildBlock ($alias)
 
 getChildHtml ($alias='', $useCache=true)
 
 getChildChildHtml ($alias, $childChildAlias='', $useCache=true)
 
 getBlockHtml ($name)
 
 insert ($element, $siblingName=0, $after=true, $alias='')
 
 append ($element, $alias='')
 
 getGroupChildNames ($groupName)
 
 getChildData ($alias, $key='')
 
 getUiId ($arg1=null, $arg2=null, $arg3=null, $arg4=null, $arg5=null)
 
 getJsId ($arg1=null, $arg2=null, $arg3=null, $arg4=null, $arg5=null)
 
 getUrl ($route='', $params=[])
 
 getViewFileUrl ($fileId, array $params=[])
 
 formatDate ( $date=null, $format=\IntlDateFormatter::SHORT, $showTime=false, $timezone=null)
 
 formatTime ( $time=null, $format=\IntlDateFormatter::SHORT, $showDate=false)
 
 getModuleName ()
 
 escapeHtml ($data, $allowedTags=null)
 
 escapeJs ($string)
 
 escapeHtmlAttr ($string, $escapeSingleQuote=true)
 
 escapeCss ($string)
 
 stripTags ($data, $allowableTags=null, $allowHtmlEntities=false)
 
 escapeUrl ($string)
 
 escapeXssInUrl ($data)
 
 escapeQuote ($data, $addSlashes=false)
 
 escapeJsQuote ($data, $quote='\'')
 
 getNameInLayout ()
 
 getCacheKeyInfo ()
 
 getCacheKey ()
 
 getVar ($name, $module=null)
 
 isScopePrivate ()
 
- Public Member Functions inherited from DataObject
 __construct (array $data=[])
 
 addData (array $arr)
 
 setData ($key, $value=null)
 
 unsetData ($key=null)
 
 getData ($key='', $index=null)
 
 getDataByPath ($path)
 
 getDataByKey ($key)
 
 setDataUsingMethod ($key, $args=[])
 
 getDataUsingMethod ($key, $args=null)
 
 hasData ($key='')
 
 toArray (array $keys=[])
 
 convertToArray (array $keys=[])
 
 toXml (array $keys=[], $rootName='item', $addOpenTag=false, $addCdata=true)
 
 convertToXml (array $arrAttributes=[], $rootName='item', $addOpenTag=false, $addCdata=true)
 
 toJson (array $keys=[])
 
 convertToJson (array $keys=[])
 
 toString ($format='')
 
 __call ($method, $args)
 
 isEmpty ()
 
 serialize ($keys=[], $valueSeparator='=', $fieldSeparator=' ', $quote='"')
 
 debug ($data=null, &$objects=[])
 
 offsetSet ($offset, $value)
 
 offsetExists ($offset)
 
 offsetUnset ($offset)
 
 offsetGet ($offset)
 
- Public Member Functions inherited from BlockInterface
 toHtml ()
 
- Public Member Functions inherited from ContextInterface
 canRender (\Magento\Backend\Block\Widget\Button\Item $item)
 

Protected Member Functions

 _construct ()
 
- Protected Member Functions inherited from Container
 _construct ()
 
 _prepareLayout ()
 
 _addNewButton ()
 
 _addBackButton ()
 
- Protected Member Functions inherited from Container
 _construct ()
 
 _prepareLayout ()
 
- Protected Member Functions inherited from Template
 _toHtml ()
 
- Protected Member Functions inherited from Template
 _construct ()
 
 _toHtml ()
 
 getRootDirectory ()
 
 getMediaDirectory ()
 
- Protected Member Functions inherited from AbstractBlock
 _construct ()
 
 _prepareLayout ()
 
 _beforeToHtml ()
 
 _afterToHtml ($html)
 
 _toHtml ()
 
 _getNotFoundUrl ($route='', $params=['_direct'=> 'core/index/notFound'])
 
 getCacheTags ()
 
 getCacheLifetime ()
 
 _loadCache ()
 
 _saveCache ($data)
 
 _getSidPlaceholder ($cacheKey=null)
 
- Protected Member Functions inherited from DataObject
 _getData ($key)
 
 _underscore ($name)
 

Additional Inherited Members

- Static Public Member Functions inherited from AbstractBlock
static extractModuleName ($className)
 
- Data Fields inherited from Container
const PARAM_BLOCK_GROUP = 'block_group'
 
const PARAM_BUTTON_NEW = 'button_new'
 
const PARAM_BUTTON_BACK = 'button_back'
 
- Data Fields inherited from Container
const PARAM_CONTROLLER = 'controller'
 
const PARAM_HEADER_TEXT = 'header_text'
 
- Data Fields inherited from Template
const XML_PATH_TEMPLATE_ALLOW_SYMLINK = 'dev/template/allow_symlink'
 
- Data Fields inherited from AbstractBlock
const CACHE_GROUP = \Magento\Framework\App\Cache\Type\Block::TYPE_IDENTIFIER
 
const CACHE_KEY_PREFIX = 'BLOCK_'
 
- Protected Attributes inherited from Container
 $_addButtonLabel
 
 $_backButtonLabel
 
 $_blockGroup = 'Magento_Backend'
 
 $_template = 'Magento_Backend::widget/grid/container.phtml'
 
- Protected Attributes inherited from Container
 $_controller = 'empty'
 
 $_headerText = 'Container Widget Header'
 
 $buttonList
 
 $toolbar
 
- Protected Attributes inherited from Template
 $_authorization
 
 $mathRandom
 
 $_backendSession
 
 $formKey
 
 $nameBuilder
 
- Protected Attributes inherited from Template
 $_viewVars = []
 
 $_baseUrl
 
 $_jsUrl
 
 $_allowSymlinks
 
 $_filesystem
 
 $_template
 
 $templateEnginePool
 
 $_storeManager
 
 $_appState
 
 $directory
 
 $templateContext
 
 $pageConfig
 
 $resolver
 
 $validator
 
- Protected Attributes inherited from AbstractBlock
 $_design
 
 $_session
 
 $_sidResolver
 
 $_nameInLayout
 
 $_layout
 
 $jsLayout = []
 
 $_request
 
 $_urlBuilder
 
 $_eventManager
 
 $_frontController
 
 $_assetRepo
 
 $_viewConfig
 
 $_cacheState
 
 $_logger
 
 $_escaper
 
 $filterManager
 
 $_localeDate
 
 $inlineTranslation
 
 $_isScopePrivate = false
 
 $_scopeConfig
 
 $_cache
 
- Protected Attributes inherited from DataObject
 $_data = []
 
- Static Protected Attributes inherited from DataObject
static $_underscoreCache = []
 

Detailed Description

@api

Since
100.0.2

Definition at line 12 of file Cache.php.

Member Function Documentation

◆ _construct()

_construct ( )
protected

Class constructor

Returns
void

Definition at line 19 of file Cache.php.

20  {
21  $this->_controller = 'cache';
22  $this->_headerText = __('Cache Storage Management');
23  parent::_construct();
24  $this->buttonList->remove('add');
25 
26  if ($this->_authorization->isAllowed('Magento_Backend::flush_magento_cache')) {
27  $this->buttonList->add(
28  'flush_magento',
29  [
30  'label' => __('Flush Magento Cache'),
31  'onclick' => 'setLocation(\'' . $this->getFlushSystemUrl() . '\')',
32  'class' => 'primary flush-cache-magento'
33  ]
34  );
35  }
36 
37  if ($this->_authorization->isAllowed('Magento_Backend::flush_cache_storage')) {
38  $message = __('The cache storage may contain additional data. Are you sure that you want to flush it?');
39  $this->buttonList->add(
40  'flush_system',
41  [
42  'label' => __('Flush Cache Storage'),
43  'onclick' => 'confirmSetLocation(\'' . $message . '\', \'' . $this->getFlushStorageUrl() . '\')',
44  'class' => 'flush-cache-storage'
45  ]
46  );
47  }
48  }
__()
Definition: __.php:13
$message

◆ getFlushStorageUrl()

getFlushStorageUrl ( )

Get url for clean cache storage

Returns
string

Definition at line 55 of file Cache.php.

56  {
57  return $this->getUrl('adminhtml/*/flushAll');
58  }

◆ getFlushSystemUrl()

getFlushSystemUrl ( )

Get url for clean cache storage

Returns
string

Definition at line 65 of file Cache.php.

66  {
67  return $this->getUrl('adminhtml/*/flushSystem');
68  }

The documentation for this class was generated from the following file: