Skip to content

Commit

Permalink
Inject block into custom-fetchers. #EZP-25771
Browse files Browse the repository at this point in the history
(cherry picked from commit c22b813)
  • Loading branch information
annitya authored and yannickroger committed May 16, 2016
1 parent 242d3af commit fcfe5c7
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?php
//
// ## BEGIN COPYRIGHT, LICENSE AND WARRANTY NOTICE ##
// SOFTWARE NAME: eZ Flow
// SOFTWARE RELEASE: 1.1-0
// COPYRIGHT NOTICE: Copyright (C) 1999-2014 eZ Systems AS
// SOFTWARE LICENSE: GNU General Public License v2.0
// NOTICE: >
// This program is free software; you can redistribute it and/or
// modify it under the terms of version 2.0 of the GNU General
// Public License as published by the Free Software Foundation.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of version 2.0 of the GNU General
// Public License along with this program; if not, write to the Free
// Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
// MA 02110-1301, USA.
//
//
// ## END COPYRIGHT, LICENSE AND WARRANTY NOTICE ##
//

class eZFlowFetchParameters
{
/** @var array */
public $block;

public function __construct( array $block )
{
$this->block = $block;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ public static function updateBlockPoolByBlockID( $block, $publishedBeforeOrAt =
$fetchClassOptions->iniFile = 'block.ini';
$fetchClassOptions->iniSection = $block['block_type'];
$fetchClassOptions->iniVariable = 'FetchClass';
$fetchClassOptions->handlerParams = array( new eZFlowFetchParameters( $block ) );

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

Expand Down

0 comments on commit fcfe5c7

Please sign in to comment.