Skip to content

Commit fcfe5c7

Browse files
annityayannickroger
authored andcommitted
Inject block into custom-fetchers. #EZP-25771
(cherry picked from commit c22b813)
1 parent 242d3af commit fcfe5c7

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<?php
2+
//
3+
// ## BEGIN COPYRIGHT, LICENSE AND WARRANTY NOTICE ##
4+
// SOFTWARE NAME: eZ Flow
5+
// SOFTWARE RELEASE: 1.1-0
6+
// COPYRIGHT NOTICE: Copyright (C) 1999-2014 eZ Systems AS
7+
// SOFTWARE LICENSE: GNU General Public License v2.0
8+
// NOTICE: >
9+
// This program is free software; you can redistribute it and/or
10+
// modify it under the terms of version 2.0 of the GNU General
11+
// Public License as published by the Free Software Foundation.
12+
//
13+
// This program is distributed in the hope that it will be useful,
14+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
15+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16+
// GNU General Public License for more details.
17+
//
18+
// You should have received a copy of version 2.0 of the GNU General
19+
// Public License along with this program; if not, write to the Free
20+
// Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
21+
// MA 02110-1301, USA.
22+
//
23+
//
24+
// ## END COPYRIGHT, LICENSE AND WARRANTY NOTICE ##
25+
//
26+
27+
class eZFlowFetchParameters
28+
{
29+
/** @var array */
30+
public $block;
31+
32+
public function __construct( array $block )
33+
{
34+
$this->block = $block;
35+
}
36+
}

packages/ezflow_extension/ezextension/ezflow/classes/ezflowoperations.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ public static function updateBlockPoolByBlockID( $block, $publishedBeforeOrAt =
7373
$fetchClassOptions->iniFile = 'block.ini';
7474
$fetchClassOptions->iniSection = $block['block_type'];
7575
$fetchClassOptions->iniVariable = 'FetchClass';
76+
$fetchClassOptions->handlerParams = array( new eZFlowFetchParameters( $block ) );
7677

7778
$fetchInstance = eZExtension::getHandlerClass( $fetchClassOptions );
7879

0 commit comments

Comments
 (0)