<?php return array (
  'unique_key' => 'name',
  'preserve_keys' => false,
  'update_object' => true,
  'related_objects' => 
  array (
    'PluginEvents' => 
    array (
      '2d3e6eedc2fd3beee556ffbf4cf6a07b' => 
      array (
        'preserve_keys' => true,
        'update_object' => false,
        'unique_key' => 
        array (
          0 => 'pluginid',
          1 => 'event',
        ),
        'class' => 'modPluginEvent',
        'object' => '{"pluginid":0,"event":"OnDocFormSave","priority":0,"propertyset":0}',
        'guid' => '705df5ac42817e8630a6f56770dacb73',
        'native_key' => 
        array (
          0 => 0,
          1 => 'OnDocFormSave',
        ),
        'signature' => 'eba2849e8d154d84b0e6ba0a6daa8639',
      ),
      '8d25134344e3abe0426cd4b62d4f38f8' => 
      array (
        'preserve_keys' => true,
        'update_object' => false,
        'unique_key' => 
        array (
          0 => 'pluginid',
          1 => 'event',
        ),
        'class' => 'modPluginEvent',
        'object' => '{"pluginid":0,"event":"OnDocPublished","priority":0,"propertyset":0}',
        'guid' => 'c96f889172ce6abe547bb744cfc429df',
        'native_key' => 
        array (
          0 => 0,
          1 => 'OnDocPublished',
        ),
        'signature' => 'd33e0ba958ee2b7774158c41da1048c6',
      ),
      '51abcab072664d8e1ad305533cbdc79f' => 
      array (
        'preserve_keys' => true,
        'update_object' => false,
        'unique_key' => 
        array (
          0 => 'pluginid',
          1 => 'event',
        ),
        'class' => 'modPluginEvent',
        'object' => '{"pluginid":0,"event":"OnDocUnPublished","priority":0,"propertyset":0}',
        'guid' => '3bdc884bf2e8b5fe5dd73ae27d92034b',
        'native_key' => 
        array (
          0 => 0,
          1 => 'OnDocUnPublished',
        ),
        'signature' => 'a48afa71cedf9df858761af87983ca3e',
      ),
      'fa4299afff7593316a5cd295f5acc8a2' => 
      array (
        'preserve_keys' => true,
        'update_object' => false,
        'unique_key' => 
        array (
          0 => 'pluginid',
          1 => 'event',
        ),
        'class' => 'modPluginEvent',
        'object' => '{"pluginid":0,"event":"OnResourceDuplicate","priority":0,"propertyset":0}',
        'guid' => 'df98ed186a37d4821d1194a5f2195de5',
        'native_key' => 
        array (
          0 => 0,
          1 => 'OnResourceDuplicate',
        ),
        'signature' => '782a0ce592086ade5d49c0f1c68f8d09',
      ),
      '56b37e6fe4c190fcfe9d436b73119210' => 
      array (
        'preserve_keys' => true,
        'update_object' => false,
        'unique_key' => 
        array (
          0 => 'pluginid',
          1 => 'event',
        ),
        'class' => 'modPluginEvent',
        'object' => '{"pluginid":0,"event":"OnResourceDelete","priority":0,"propertyset":0}',
        'guid' => '1381546272f0fe4640ce14918caad049',
        'native_key' => 
        array (
          0 => 0,
          1 => 'OnResourceDelete',
        ),
        'signature' => '6adaefb2f36a457f15cb142020109ea9',
      ),
      '07f0493e84b7d96b781d574cdd0625c8' => 
      array (
        'preserve_keys' => true,
        'update_object' => false,
        'unique_key' => 
        array (
          0 => 'pluginid',
          1 => 'event',
        ),
        'class' => 'modPluginEvent',
        'object' => '{"pluginid":0,"event":"OnResourceUndelete","priority":0,"propertyset":0}',
        'guid' => '0b1aa91830d2e79caa02a14a7b5d7f81',
        'native_key' => 
        array (
          0 => 0,
          1 => 'OnResourceUndelete',
        ),
        'signature' => '5927e29a8c9fcdc93a61d4f2868030cc',
      ),
    ),
  ),
  'related_object_attributes' => 
  array (
    'PluginEvents' => 
    array (
      'preserve_keys' => true,
      'update_object' => false,
      'unique_key' => 
      array (
        0 => 'pluginid',
        1 => 'event',
      ),
    ),
  ),
  'namespace' => 'sisea',
  'resolve' => NULL,
  'validate' => NULL,
  'vehicle_package' => 'transport',
  'vehicle_class' => 'xPDOObjectVehicle',
  'guid' => '5a4222ff5ee59e00b9f81cecbb1430ef',
  'package' => 'modx',
  'class' => 'modPlugin',
  'signature' => '411018f6b84dfb9ea1218c6e184a1d8c',
  'native_key' => 1,
  'object' => '{"id":1,"source":0,"property_preprocess":0,"name":"SimpleSearchIndexer","description":"Automatically indexes Resources into Solr.","editor_type":0,"category":0,"cache_type":0,"plugincode":"\\/**\\n * SimpleSearch\\n *\\n * Copyright 2010-11 by Shaun McCormick <shaun+sisea@modx.com>\\n *\\n * This file is part of SimpleSearch, a simple search component for MODx\\n * Revolution. It is loosely based off of AjaxSearch for MODx Evolution by\\n * coroico\\/kylej, minus the ajax.\\n *\\n * SimpleSearch is free software; you can redistribute it and\\/or modify it under\\n * the terms of the GNU General Public License as published by the Free Software\\n * Foundation; either version 2 of the License, or (at your option) any later\\n * version.\\n *\\n * SimpleSearch is distributed in the hope that it will be useful, but WITHOUT\\n * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\\n * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more\\n * details.\\n *\\n * You should have received a copy of the GNU General Public License along with\\n * SimpleSearch; if not, write to the Free Software Foundation, Inc., 59 Temple Place,\\n * Suite 330, Boston, MA 02111-1307 USA\\n *\\n * @package simplesearch\\n *\\/\\n\\/**\\n * Plugin to index Resources whenever they are changed, published, unpublished,\\n * deleted, or undeleted.\\n *\\n * @var modX $modx\\n * @var SimpleSearch $search\\n *\\n * @package simplesearch\\n *\\/\\nrequire_once $modx->getOption(\'sisea.core_path\',null,$modx->getOption(\'core_path\').\'components\\/simplesearch\\/\').\'model\\/simplesearch\\/simplesearch.class.php\';\\n$search = new SimpleSearch($modx,$scriptProperties);\\n\\n$search->loadDriver($scriptProperties);\\nif (!$search->driver || !($search->driver instanceof SimpleSearchDriverSolr)) return;\\n\\n\\/**\\n * helper method for missing params in events\\n * @param modX $modx\\n * @param array $children\\n * @param id $parent\\n * @return boolean\\n *\\/\\nfunction SimpleSearchGetChildren(&$modx,&$children,$parent) {\\n    $success = false;\\n    $kids = $modx->getCollection(\'modResource\',array(\\n        \'parent\' => $parent,\\n    ));\\n    if (!empty($kids)) {\\n        \\/** @var modResource $kid *\\/\\n        foreach ($kids as $kid) {\\n            $children[] = $kid->toArray();\\n            SimpleSearchGetChildren($modx,$children,$kid->get(\'id\'));\\n        }\\n    }\\n    return $success;\\n}\\n\\n$action = \'index\';\\n$resourcesToIndex = array();\\nswitch ($modx->event->name) {\\n    case \'OnDocFormSave\':\\n        $action = \'index\';\\n        $resourceArray = $scriptProperties[\'resource\']->toArray();\\n        foreach ($_POST as $k => $v) {\\n            if (substr($k,0,2) == \'tv\') {\\n                $id = str_replace(\'tv\',\'\',$k);\\n                \\/** @var modTemplateVar $tv *\\/\\n                $tv = $modx->getObject(\'modTemplateVar\',$id);\\n                if ($tv) {\\n                    $resourceArray[$tv->get(\'name\')] = $tv->renderOutput($resource->get(\'id\'));\\n                    $modx->log(modX::LOG_LEVEL_DEBUG,\'Indexing \'.$tv->get(\'name\').\': \'.$resourceArray[$tv->get(\'name\')]);\\n                }\\n                unset($resourceArray[$k]);\\n            }\\n        }\\n        unset($resourceArray[\'ta\'],$resourceArray[\'action\'],$resourceArray[\'tiny_toggle\'],$resourceArray[\'HTTP_MODAUTH\'],$resourceArray[\'modx-ab-stay\'],$resourceArray[\'resource_groups\']);\\n        $resourcesToIndex[] = $resourceArray;\\n        break;\\n    case \'OnDocPublished\':\\n        $action = \'index\';\\n        $resourceArray = $scriptProperties[\'resource\']->toArray();\\n        unset($resourceArray[\'ta\'],$resourceArray[\'action\'],$resourceArray[\'tiny_toggle\'],$resourceArray[\'HTTP_MODAUTH\'],$resourceArray[\'modx-ab-stay\'],$resourceArray[\'resource_groups\']);\\n        $resourcesToIndex[] = $resourceArray;\\n        break;\\n    case \'OnDocUnpublished\':\\n    case \'OnDocUnPublished\':\\n        $action = \'removeIndex\';\\n        $resourceArray = $scriptProperties[\'resource\']->toArray();\\n        unset($resourceArray[\'ta\'],$resourceArray[\'action\'],$resourceArray[\'tiny_toggle\'],$resourceArray[\'HTTP_MODAUTH\'],$resourceArray[\'modx-ab-stay\'],$resourceArray[\'resource_groups\']);\\n        $resourcesToIndex[] = $resourceArray;\\n        break;\\n    case \'OnResourceDuplicate\':\\n        $action = \'index\';\\n        \\/** @var modResource $newResource *\\/\\n        $resourcesToIndex[] = $newResource->toArray();\\n        $children = array();\\n        SimpleSearchGetChildren($modx,$children,$newResource->get(\'id\'));\\n        foreach ($children as $child) {\\n            $resourcesToIndex[] = $child;\\n        }\\n        break;\\n    case \'OnResourceDelete\':\\n        $action = \'removeIndex\';\\n        $resourcesToIndex[] = $resource->toArray();\\n        $children = array();\\n        SimpleSearchGetChildren($modx,$children,$resource->get(\'id\'));\\n        foreach ($children as $child) {\\n            $resourcesToIndex[] = $child;\\n        }\\n        break;\\n    case \'OnResourceUndelete\':\\n        $action = \'index\';\\n        $resourcesToIndex[] = $resource->toArray();\\n        $children = array();\\n        SimpleSearchGetChildren($modx,$children,$resource->get(\'id\'));\\n        foreach ($children as $child) {\\n            $resourcesToIndex[] = $child;\\n        }\\n        break;\\n}\\n\\nforeach ($resourcesToIndex as $resourceArray) {\\n    if (!empty($resourceArray[\'id\'])) {\\n        if ($action == \'index\') {\\n            $search->driver->index($resourceArray);\\n        } else if ($action == \'removeIndex\') {\\n            $search->driver->removeIndex($resourceArray[\'id\']);\\n        }\\n    }\\n}\\nreturn;","locked":0,"properties":null,"disabled":0,"moduleguid":"","static":0,"static_file":"","content":"\\/**\\n * SimpleSearch\\n *\\n * Copyright 2010-11 by Shaun McCormick <shaun+sisea@modx.com>\\n *\\n * This file is part of SimpleSearch, a simple search component for MODx\\n * Revolution. It is loosely based off of AjaxSearch for MODx Evolution by\\n * coroico\\/kylej, minus the ajax.\\n *\\n * SimpleSearch is free software; you can redistribute it and\\/or modify it under\\n * the terms of the GNU General Public License as published by the Free Software\\n * Foundation; either version 2 of the License, or (at your option) any later\\n * version.\\n *\\n * SimpleSearch is distributed in the hope that it will be useful, but WITHOUT\\n * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\\n * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more\\n * details.\\n *\\n * You should have received a copy of the GNU General Public License along with\\n * SimpleSearch; if not, write to the Free Software Foundation, Inc., 59 Temple Place,\\n * Suite 330, Boston, MA 02111-1307 USA\\n *\\n * @package simplesearch\\n *\\/\\n\\/**\\n * Plugin to index Resources whenever they are changed, published, unpublished,\\n * deleted, or undeleted.\\n *\\n * @var modX $modx\\n * @var SimpleSearch $search\\n *\\n * @package simplesearch\\n *\\/\\nrequire_once $modx->getOption(\'sisea.core_path\',null,$modx->getOption(\'core_path\').\'components\\/simplesearch\\/\').\'model\\/simplesearch\\/simplesearch.class.php\';\\n$search = new SimpleSearch($modx,$scriptProperties);\\n\\n$search->loadDriver($scriptProperties);\\nif (!$search->driver || !($search->driver instanceof SimpleSearchDriverSolr)) return;\\n\\n\\/**\\n * helper method for missing params in events\\n * @param modX $modx\\n * @param array $children\\n * @param id $parent\\n * @return boolean\\n *\\/\\nfunction SimpleSearchGetChildren(&$modx,&$children,$parent) {\\n    $success = false;\\n    $kids = $modx->getCollection(\'modResource\',array(\\n        \'parent\' => $parent,\\n    ));\\n    if (!empty($kids)) {\\n        \\/** @var modResource $kid *\\/\\n        foreach ($kids as $kid) {\\n            $children[] = $kid->toArray();\\n            SimpleSearchGetChildren($modx,$children,$kid->get(\'id\'));\\n        }\\n    }\\n    return $success;\\n}\\n\\n$action = \'index\';\\n$resourcesToIndex = array();\\nswitch ($modx->event->name) {\\n    case \'OnDocFormSave\':\\n        $action = \'index\';\\n        $resourceArray = $scriptProperties[\'resource\']->toArray();\\n        foreach ($_POST as $k => $v) {\\n            if (substr($k,0,2) == \'tv\') {\\n                $id = str_replace(\'tv\',\'\',$k);\\n                \\/** @var modTemplateVar $tv *\\/\\n                $tv = $modx->getObject(\'modTemplateVar\',$id);\\n                if ($tv) {\\n                    $resourceArray[$tv->get(\'name\')] = $tv->renderOutput($resource->get(\'id\'));\\n                    $modx->log(modX::LOG_LEVEL_DEBUG,\'Indexing \'.$tv->get(\'name\').\': \'.$resourceArray[$tv->get(\'name\')]);\\n                }\\n                unset($resourceArray[$k]);\\n            }\\n        }\\n        unset($resourceArray[\'ta\'],$resourceArray[\'action\'],$resourceArray[\'tiny_toggle\'],$resourceArray[\'HTTP_MODAUTH\'],$resourceArray[\'modx-ab-stay\'],$resourceArray[\'resource_groups\']);\\n        $resourcesToIndex[] = $resourceArray;\\n        break;\\n    case \'OnDocPublished\':\\n        $action = \'index\';\\n        $resourceArray = $scriptProperties[\'resource\']->toArray();\\n        unset($resourceArray[\'ta\'],$resourceArray[\'action\'],$resourceArray[\'tiny_toggle\'],$resourceArray[\'HTTP_MODAUTH\'],$resourceArray[\'modx-ab-stay\'],$resourceArray[\'resource_groups\']);\\n        $resourcesToIndex[] = $resourceArray;\\n        break;\\n    case \'OnDocUnpublished\':\\n    case \'OnDocUnPublished\':\\n        $action = \'removeIndex\';\\n        $resourceArray = $scriptProperties[\'resource\']->toArray();\\n        unset($resourceArray[\'ta\'],$resourceArray[\'action\'],$resourceArray[\'tiny_toggle\'],$resourceArray[\'HTTP_MODAUTH\'],$resourceArray[\'modx-ab-stay\'],$resourceArray[\'resource_groups\']);\\n        $resourcesToIndex[] = $resourceArray;\\n        break;\\n    case \'OnResourceDuplicate\':\\n        $action = \'index\';\\n        \\/** @var modResource $newResource *\\/\\n        $resourcesToIndex[] = $newResource->toArray();\\n        $children = array();\\n        SimpleSearchGetChildren($modx,$children,$newResource->get(\'id\'));\\n        foreach ($children as $child) {\\n            $resourcesToIndex[] = $child;\\n        }\\n        break;\\n    case \'OnResourceDelete\':\\n        $action = \'removeIndex\';\\n        $resourcesToIndex[] = $resource->toArray();\\n        $children = array();\\n        SimpleSearchGetChildren($modx,$children,$resource->get(\'id\'));\\n        foreach ($children as $child) {\\n            $resourcesToIndex[] = $child;\\n        }\\n        break;\\n    case \'OnResourceUndelete\':\\n        $action = \'index\';\\n        $resourcesToIndex[] = $resource->toArray();\\n        $children = array();\\n        SimpleSearchGetChildren($modx,$children,$resource->get(\'id\'));\\n        foreach ($children as $child) {\\n            $resourcesToIndex[] = $child;\\n        }\\n        break;\\n}\\n\\nforeach ($resourcesToIndex as $resourceArray) {\\n    if (!empty($resourceArray[\'id\'])) {\\n        if ($action == \'index\') {\\n            $search->driver->index($resourceArray);\\n        } else if ($action == \'removeIndex\') {\\n            $search->driver->removeIndex($resourceArray[\'id\']);\\n        }\\n    }\\n}\\nreturn;"}',
);