Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Protected Member Functions | Protected Attributes
Processor Class Reference
Inheritance diagram for Processor:
ProcessorInterface

Public Member Functions

 __construct (View\CollectionFactory $viewsFactory)
 
 update ($group='')
 
 clearChangelog ($group='')
 

Protected Member Functions

 getViewsByGroup ($group='')
 

Protected Attributes

 $viewsFactory
 

Detailed Description

Definition at line 8 of file Processor.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( View\CollectionFactory  $viewsFactory)
Parameters
View\CollectionFactory$viewsFactory

Definition at line 18 of file Processor.php.

19  {
20  $this->viewsFactory = $viewsFactory;
21  }

Member Function Documentation

◆ clearChangelog()

clearChangelog (   $group = '')

Clear all views' changelogs by group (all views if empty)

Parameters
string$group
Returns
void

Implements ProcessorInterface.

Definition at line 54 of file Processor.php.

55  {
56  foreach ($this->getViewsByGroup($group) as $view) {
57  $view->clearChangelog();
58  }
59  }
$group
Definition: sections.phtml:16

◆ getViewsByGroup()

getViewsByGroup (   $group = '')
protected

Return list of views by group

Parameters
string$group
Returns
ViewInterface[]

Definition at line 29 of file Processor.php.

30  {
31  $collection = $this->viewsFactory->create();
32  return $group ? $collection->getItemsByColumnValue('group', $group) : $collection->getItems();
33  }
$group
Definition: sections.phtml:16

◆ update()

update (   $group = '')

Materialize all views by group (all views if empty)

Parameters
string$group
Returns
void

Implements ProcessorInterface.

Definition at line 41 of file Processor.php.

42  {
43  foreach ($this->getViewsByGroup($group) as $view) {
44  $view->update();
45  }
46  }
$group
Definition: sections.phtml:16

Field Documentation

◆ $viewsFactory

$viewsFactory
protected

Definition at line 13 of file Processor.php.


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