Standard   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 17
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A data() 0 5 1
1
<?php
2
3
/**
4
 * @license LGPLv3, http://opensource.org/licenses/LGPL-3.0
5
 * @copyright Aimeos (aimeos.org), 2015-2025
6
 * @package Client
7
 * @subpackage Html
8
 */
9
10
11
namespace Aimeos\Client\Html\Catalog\Session\Seen;
12
13
14
/**
15
 * Default implementation of catalog session seen section for HTML clients.
16
 *
17
 * @package Client
18
 * @subpackage Html
19
 */
20
class Standard
21
	extends \Aimeos\Client\Html\Common\Client\Factory\Base
22
	implements \Aimeos\Client\Html\Common\Client\Factory\Iface
23
{
24
	/**
25
	 * Sets the necessary parameter values in the view.
26
	 *
27
	 * @param \Aimeos\Base\View\Iface $view The view object which generates the HTML output
28
	 * @param array &$tags Result array for the list of tags that are associated to the output
29
	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
30
	 * @return \Aimeos\Base\View\Iface Modified view object
31
	 */
32
	public function data( \Aimeos\Base\View\Iface $view, array &$tags = [], ?string &$expire = null ) : \Aimeos\Base\View\Iface
33
	{
34
		$view->seenItems = array_reverse( $this->context()->session()->get( 'aimeos/catalog/session/seen/list', [] ) );
35
36
		return parent::data( $view, $tags, $expire );
37
	}
38
39
40
	/** client/html/catalog/session/seen/template-body
41
	 * Relative path to the HTML body template of the catalog session seen client.
42
	 *
43
	 * The template file contains the HTML code and processing instructions
44
	 * to generate the result shown in the body of the frontend. The
45
	 * configuration string is the path to the template file relative
46
	 * to the templates directory (usually in templates/client/html).
47
	 *
48
	 * You can overwrite the template file configuration in extensions and
49
	 * provide alternative templates. These alternative templates should be
50
	 * named like the default one but suffixed by
51
	 * an unique name. You may use the name of your project for this. If
52
	 * you've implemented an alternative client class as well, it
53
	 * should be suffixed by the name of the new class.
54
	 *
55
	 * @param string Relative path to the template creating code for the HTML page body
56
	 * @since 2014.03
57
	 * @see client/html/catalog/session/seen/template-header
58
	 */
59
}
60