<?php
namespace Claromentis\Quiz\Search;

$GLOBALS["__65da1b1ec2d6653e8a0ab7848e53621" . "5"] = (@$GLOBALS["__65da1b1ec2d6653e8a0ab7848e536" . "215"] ?: array()) + array("perm" . "issi" . "ons" => base64_decode("cGVybWl" . "zc2lvbn" . "M="));
use Claromentis\Core\Acl\AclRepository;
use Claromentis\Core\CDN\CDNInterface;
use Claromentis\Core\Security\SecurityContext;
use Claromentis\Core\TextUtil\ClaText;
use Claromentis\Quiz\Facade\PollFacade;
use Claromentis\Quiz\Permissions\SurveyAdminPermissions;
use Claromentis\Quiz\Repository\PollRepository;
use Claromentis\Search\GlobalSearchItemInterface;
use Claromentis\Search\Permissions as SearchPermissions;




class PollSearch implements GlobalSearchItemInterface
{
    
    
    protected $cdn;
    
    
    protected $cla_text;
    
    
    protected $poll_repo;
    
    
    protected $survey_admin_permissions;
    protected $poll_facade;
    public function __construct(CDNInterface $cdn, ClaText $cla_text, PollRepository $poll_repo, SurveyAdminPermissions $survey_admin_permissions, PollFacade $poll_facade)
    {
        $this->cdn = $cdn;
        $this->cla_text = $cla_text;
        $this->poll_repo = $poll_repo;
        $this->survey_admin_permissions = $survey_admin_permissions;
        $this->poll_facade = $poll_facade;
    }
    
    
    
    
    
    
    public function GetIndexingObject()
    {
        return new Indexing\PollIndexing($this->cdn, $this->cla_text, $this->poll_repo, $this->survey_admin_permissions, $this->poll_facade);
    }
    
    
    
    
    
    
    
    public function GetPermissionsSearchFilter(SecurityContext $context)
    {
        $_6905a4a1c788ec5cb2cfea8ca6e4043e = new SearchPermissions();
        return $_6905a4a1c788ec5cb2cfea8ca6e4043e->GetSearchFilter($context, $GLOBALS["__65da1b1ec2d6653e8a0ab78" . "48e536215"]["perm" . "issi" . "ons"]);
    }
    
    
    
    
    
    
    public function GetView()
    {
        return new View\PollView();
    }
}