<?php  return array (
  'config' => 
  array (
  ),
  'resourceMap' => 
  array (
    0 => 
    array (
      0 => 2,
      1 => 388,
      2 => 57,
      3 => 10,
      4 => 11,
      5 => 40,
      6 => 43,
      7 => 18,
      8 => 32,
      9 => 12,
      10 => 21,
      11 => 23,
    ),
    2 => 
    array (
      0 => 3,
      1 => 94,
    ),
    3 => 
    array (
      0 => 4,
      1 => 60,
      2 => 88,
      3 => 89,
      4 => 90,
      5 => 91,
      6 => 92,
      7 => 93,
    ),
    4 => 
    array (
      0 => 5,
      1 => 96,
      2 => 97,
      3 => 98,
      4 => 99,
      5 => 100,
      6 => 101,
      7 => 102,
      8 => 103,
      9 => 85,
      10 => 166,
    ),
    5 => 
    array (
      0 => 69,
      1 => 70,
      2 => 71,
      3 => 72,
      4 => 73,
      5 => 74,
      6 => 80,
      7 => 81,
      8 => 83,
    ),
    10 => 
    array (
      0 => 1,
      1 => 53,
      2 => 67,
      3 => 319,
    ),
    11 => 
    array (
      0 => 14,
    ),
    12 => 
    array (
      0 => 28,
      1 => 37,
      2 => 39,
    ),
    18 => 
    array (
      0 => 19,
      1 => 20,
    ),
    21 => 
    array (
      0 => 13,
      1 => 22,
      2 => 31,
    ),
    23 => 
    array (
      0 => 24,
      1 => 25,
      2 => 26,
    ),
    32 => 
    array (
      0 => 33,
      1 => 34,
      2 => 35,
    ),
    33 => 
    array (
      0 => 36,
    ),
    34 => 
    array (
      0 => 50,
    ),
    35 => 
    array (
      0 => 38,
    ),
    40 => 
    array (
      0 => 41,
      1 => 42,
    ),
    43 => 
    array (
      0 => 44,
      1 => 45,
    ),
    57 => 
    array (
      0 => 76,
      1 => 77,
      2 => 78,
      3 => 79,
      4 => 82,
      5 => 134,
      6 => 84,
      7 => 158,
      8 => 168,
      9 => 170,
      10 => 171,
      11 => 173,
      12 => 175,
      13 => 177,
      14 => 180,
      15 => 185,
      16 => 186,
      17 => 188,
      18 => 193,
      19 => 208,
      20 => 210,
      21 => 216,
      22 => 218,
      23 => 229,
      24 => 230,
      25 => 235,
      26 => 236,
      27 => 238,
      28 => 241,
      29 => 244,
      30 => 247,
      31 => 250,
      32 => 251,
      33 => 253,
      34 => 263,
      35 => 267,
      36 => 268,
      37 => 273,
      38 => 275,
      39 => 277,
      40 => 286,
      41 => 287,
      42 => 289,
      43 => 291,
      44 => 293,
      45 => 300,
      46 => 304,
      47 => 306,
      48 => 311,
      49 => 313,
      50 => 321,
      51 => 327,
    ),
    60 => 
    array (
      0 => 104,
      1 => 105,
      2 => 106,
      3 => 107,
      4 => 108,
      5 => 109,
      6 => 110,
      7 => 111,
      8 => 112,
    ),
    85 => 
    array (
      0 => 86,
      1 => 87,
      2 => 132,
      3 => 136,
      4 => 137,
      5 => 138,
      6 => 139,
      7 => 140,
      8 => 141,
      9 => 142,
      10 => 143,
      11 => 144,
      12 => 145,
      13 => 146,
      14 => 147,
      15 => 148,
      16 => 149,
      17 => 150,
      18 => 151,
      19 => 152,
      20 => 153,
      21 => 154,
      22 => 155,
      23 => 156,
      24 => 157,
      25 => 159,
      26 => 160,
      27 => 161,
      28 => 162,
    ),
    88 => 
    array (
      0 => 113,
      1 => 114,
    ),
    89 => 
    array (
      0 => 115,
    ),
    90 => 
    array (
      0 => 116,
      1 => 117,
      2 => 118,
      3 => 119,
      4 => 120,
      5 => 121,
      6 => 122,
    ),
    91 => 
    array (
      0 => 123,
      1 => 124,
      2 => 125,
      3 => 126,
    ),
    92 => 
    array (
      0 => 127,
      1 => 128,
    ),
    93 => 
    array (
      0 => 129,
      1 => 130,
      2 => 131,
    ),
    96 => 
    array (
      0 => 163,
      1 => 164,
      2 => 165,
    ),
    97 => 
    array (
      0 => 279,
      1 => 280,
      2 => 281,
      3 => 282,
      4 => 284,
      5 => 285,
      6 => 288,
      7 => 290,
      8 => 292,
      9 => 294,
      10 => 295,
      11 => 296,
      12 => 297,
      13 => 298,
      14 => 299,
      15 => 301,
      16 => 302,
      17 => 303,
      18 => 305,
      19 => 307,
      20 => 308,
      21 => 309,
      22 => 310,
      23 => 312,
      24 => 314,
      25 => 315,
      26 => 316,
      27 => 317,
      28 => 318,
      29 => 320,
      30 => 322,
      31 => 323,
      32 => 324,
      33 => 325,
      34 => 326,
    ),
    98 => 
    array (
      0 => 246,
      1 => 249,
    ),
    99 => 
    array (
      0 => 203,
      1 => 204,
      2 => 205,
      3 => 206,
      4 => 207,
      5 => 209,
      6 => 211,
      7 => 212,
      8 => 213,
      9 => 214,
      10 => 215,
      11 => 217,
      12 => 219,
      13 => 220,
      14 => 221,
      15 => 222,
      16 => 223,
      17 => 224,
      18 => 225,
      19 => 226,
      20 => 227,
      21 => 228,
      22 => 231,
      23 => 232,
      24 => 234,
      25 => 237,
      26 => 239,
      27 => 240,
      28 => 243,
      29 => 245,
      30 => 339,
    ),
    100 => 
    array (
      0 => 252,
      1 => 254,
      2 => 255,
      3 => 256,
      4 => 257,
      5 => 258,
      6 => 259,
      7 => 260,
      8 => 261,
      9 => 262,
      10 => 264,
      11 => 265,
      12 => 266,
      13 => 269,
      14 => 270,
      15 => 271,
      16 => 272,
      17 => 274,
      18 => 276,
      19 => 278,
    ),
    117 => 
    array (
      0 => 378,
      1 => 379,
      2 => 380,
      3 => 382,
      4 => 383,
      5 => 384,
      6 => 385,
      7 => 386,
      8 => 387,
    ),
    125 => 
    array (
      0 => 328,
      1 => 329,
      2 => 330,
      3 => 331,
      4 => 332,
      5 => 333,
      6 => 334,
      7 => 335,
      8 => 336,
      9 => 341,
      10 => 342,
      11 => 343,
      12 => 344,
      13 => 345,
      14 => 346,
      15 => 347,
      16 => 348,
      17 => 349,
      18 => 350,
      19 => 351,
      20 => 352,
      21 => 353,
      22 => 354,
      23 => 355,
      24 => 356,
      25 => 357,
      26 => 358,
      27 => 359,
      28 => 360,
      29 => 361,
      30 => 362,
      31 => 363,
      32 => 364,
      33 => 365,
      34 => 366,
      35 => 367,
      36 => 368,
      37 => 369,
      38 => 370,
      39 => 371,
      40 => 372,
      41 => 373,
      42 => 374,
      43 => 375,
      44 => 376,
      45 => 377,
    ),
    166 => 
    array (
      0 => 167,
      1 => 172,
      2 => 174,
      3 => 176,
      4 => 178,
      5 => 179,
      6 => 181,
      7 => 182,
      8 => 183,
      9 => 184,
      10 => 187,
      11 => 189,
      12 => 190,
      13 => 191,
      14 => 192,
      15 => 194,
      16 => 195,
      17 => 196,
      18 => 197,
      19 => 198,
      20 => 199,
      21 => 200,
      22 => 201,
      23 => 202,
    ),
    339 => 
    array (
      0 => 340,
    ),
  ),
  'webLinkMap' => 
  array (
  ),
  'eventMap' => 
  array (
    'OnDocFormSave' => 
    array (
      4 => '4',
    ),
    'OnDocPublished' => 
    array (
      4 => '4',
    ),
    'OnDocUnPublished' => 
    array (
      4 => '4',
    ),
    'OnResourceDelete' => 
    array (
      4 => '4',
    ),
    'OnResourceDuplicate' => 
    array (
      4 => '4',
    ),
    'OnResourceUndelete' => 
    array (
      4 => '4',
    ),
  ),
  'pluginCache' => 
  array (
    4 => 
    array (
      'id' => '4',
      'source' => '0',
      'property_preprocess' => '0',
      'name' => 'SimpleSearchIndexer',
      'description' => 'Automatically indexes Resources into Solr.',
      'editor_type' => '0',
      'category' => '0',
      'cache_type' => '0',
      'plugincode' => '/**
 * SimpleSearch
 *
 * Copyright 2010-11 by Shaun McCormick <shaun+sisea@modx.com>
 *
 * This file is part of SimpleSearch, a simple search component for MODx
 * Revolution. It is loosely based off of AjaxSearch for MODx Evolution by
 * coroico/kylej, minus the ajax.
 *
 * SimpleSearch is free software; you can redistribute it and/or modify it under
 * the terms of the GNU General Public License as published by the Free Software
 * Foundation; either version 2 of the License, or (at your option) any later
 * version.
 *
 * SimpleSearch 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 the GNU General Public License along with
 * SimpleSearch; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
 * Suite 330, Boston, MA 02111-1307 USA
 *
 * @package simplesearch
 */
/**
 * Plugin to index Resources whenever they are changed, published, unpublished,
 * deleted, or undeleted.
 *
 * @package simplesearch
 */
require_once $modx->getOption(\'sisea.core_path\',null,$modx->getOption(\'core_path\').\'components/simplesearch/\').\'model/simplesearch/simplesearch.class.php\';
$search = new SimpleSearch($modx,$scriptProperties);

$search->loadDriver($scriptProperties);
if (!$search->driver || !($search->driver instanceof SimpleSearchDriverSolr)) return;

/* helper method for missing params in events */
function SimpleSearchGetChildren(&$modx,&$children,$parent) {
    $success = false;
    $kids = $modx->getCollection(\'modResource\',array(
        \'parent\' => $parent,
    ));
    if (!empty($kids)) {
        foreach ($kids as $kid) {
            $children[] = $kid->toArray();
            SimpleSearchGetChildren($modx,$children,$kid->get(\'id\'));
        }
    }
    return $success;
}

$action = \'index\';
$resourcesToIndex = array();
switch ($modx->event->name) {
    case \'OnDocFormSave\':
        $action = \'index\';
        $resourceArray = $scriptProperties[\'resource\']->toArray();
        unset($resourceArray[\'ta\'],$resourceArray[\'action\'],$resourceArray[\'tiny_toggle\'],$resourceArray[\'HTTP_MODAUTH\'],$resourceArray[\'modx-ab-stay\'],$resourceArray[\'resource_groups\']);
        $resourcesToIndex[] = $resourceArray;
        break;
    case \'OnDocPublished\':
        $action = \'index\';
        $resourceArray = $scriptProperties[\'resource\']->toArray();
        unset($resourceArray[\'ta\'],$resourceArray[\'action\'],$resourceArray[\'tiny_toggle\'],$resourceArray[\'HTTP_MODAUTH\'],$resourceArray[\'modx-ab-stay\'],$resourceArray[\'resource_groups\']);
        $resourcesToIndex[] = $resourceArray;
        break;
    case \'OnDocUnpublished\':
    case \'OnDocUnPublished\':
        $action = \'removeIndex\';
        $resourceArray = $scriptProperties[\'resource\']->toArray();
        unset($resourceArray[\'ta\'],$resourceArray[\'action\'],$resourceArray[\'tiny_toggle\'],$resourceArray[\'HTTP_MODAUTH\'],$resourceArray[\'modx-ab-stay\'],$resourceArray[\'resource_groups\']);
        $resourcesToIndex[] = $resourceArray;
        break;
    case \'OnResourceDuplicate\':
        $action = \'index\';
        $resourcesToIndex[] = $newResource->toArray();
        $children = array();
        SimpleSearchGetChildren($modx,$children,$newResource->get(\'id\'));
        foreach ($children as $child) {
            $resourcesToIndex[] = $child;
        }
        break;
    case \'OnResourceDelete\':
        $action = \'removeIndex\';
        $resourcesToIndex[] = $resource->toArray();
        $children = array();
        SimpleSearchGetChildren($modx,$children,$resource->get(\'id\'));
        foreach ($children as $child) {
            $resourcesToIndex[] = $child;
        }
        break;
    case \'OnResourceUndelete\':
        $action = \'index\';
        $resourcesToIndex[] = $resource->toArray();
        $children = array();
        SimpleSearchGetChildren($modx,$children,$resource->get(\'id\'));
        foreach ($children as $child) {
            $resourcesToIndex[] = $child;
        }
        break;
}

foreach ($resourcesToIndex as $resourceArray) {
    if (!empty($resourceArray[\'id\'])) {
        if ($action == \'index\') {
            $search->driver->index($resourceArray);
        } else if ($action == \'removeIndex\') {
            $search->driver->removeIndex($resourceArray[\'id\']);
        }
    }
}
return;',
      'locked' => '0',
      'properties' => NULL,
      'disabled' => '0',
      'moduleguid' => '',
      'static' => '0',
      'static_file' => '',
    ),
  ),
  'policies' => 
  array (
    'modAccessContext' => 
    array (
      'web' => 
      array (
        0 => 
        array (
          'principal' => 0,
          'authority' => 9999,
          'policy' => 
          array (
            'load' => true,
          ),
        ),
        1 => 
        array (
          'principal' => 0,
          'authority' => 9999,
          'policy' => 
          array (
            'load' => true,
          ),
        ),
        2 => 
        array (
          'principal' => 0,
          'authority' => 9999,
          'policy' => 
          array (
            'load' => true,
          ),
        ),
        3 => 
        array (
          'principal' => 1,
          'authority' => 0,
          'policy' => 
          array (
            'about' => true,
            'access_permissions' => true,
            'actions' => true,
            'change_password' => true,
            'change_profile' => true,
            'charsets' => true,
            'class_map' => true,
            'components' => true,
            'content_types' => true,
            'countries' => true,
            'create' => true,
            'credits' => true,
            'customize_forms' => true,
            'dashboards' => true,
            'database' => true,
            'database_truncate' => true,
            'delete_category' => true,
            'delete_chunk' => true,
            'delete_context' => true,
            'delete_document' => true,
            'delete_eventlog' => true,
            'delete_plugin' => true,
            'delete_propertyset' => true,
            'delete_role' => true,
            'delete_snippet' => true,
            'delete_template' => true,
            'delete_tv' => true,
            'delete_user' => true,
            'directory_chmod' => true,
            'directory_create' => true,
            'directory_list' => true,
            'directory_remove' => true,
            'directory_update' => true,
            'edit_category' => true,
            'edit_chunk' => true,
            'edit_context' => true,
            'edit_document' => true,
            'edit_locked' => true,
            'edit_plugin' => true,
            'edit_propertyset' => true,
            'edit_role' => true,
            'edit_snippet' => true,
            'edit_template' => true,
            'edit_tv' => true,
            'edit_user' => true,
            'element_tree' => true,
            'empty_cache' => true,
            'error_log_erase' => true,
            'error_log_view' => true,
            'events' => true,
            'export_static' => true,
            'file_create' => true,
            'file_list' => true,
            'file_manager' => true,
            'file_remove' => true,
            'file_tree' => true,
            'file_update' => true,
            'file_upload' => true,
            'file_unpack' => true,
            'file_view' => true,
            'flush_sessions' => true,
            'frames' => true,
            'help' => true,
            'home' => true,
            'import_static' => true,
            'languages' => true,
            'lexicons' => true,
            'list' => true,
            'load' => true,
            'logout' => true,
            'logs' => true,
            'menus' => true,
            'menu_reports' => true,
            'menu_security' => true,
            'menu_site' => true,
            'menu_support' => true,
            'menu_system' => true,
            'menu_tools' => true,
            'menu_user' => true,
            'messages' => true,
            'namespaces' => true,
            'new_category' => true,
            'new_chunk' => true,
            'new_context' => true,
            'new_document' => true,
            'new_document_in_root' => true,
            'new_plugin' => true,
            'new_propertyset' => true,
            'new_role' => true,
            'new_snippet' => true,
            'new_static_resource' => true,
            'new_symlink' => true,
            'new_template' => true,
            'new_tv' => true,
            'new_user' => true,
            'new_weblink' => true,
            'packages' => true,
            'policy_delete' => true,
            'policy_edit' => true,
            'policy_new' => true,
            'policy_save' => true,
            'policy_template_delete' => true,
            'policy_template_edit' => true,
            'policy_template_new' => true,
            'policy_template_save' => true,
            'policy_template_view' => true,
            'policy_view' => true,
            'property_sets' => true,
            'providers' => true,
            'publish_document' => true,
            'purge_deleted' => true,
            'remove' => true,
            'remove_locks' => true,
            'resource_duplicate' => true,
            'resourcegroup_delete' => true,
            'resourcegroup_edit' => true,
            'resourcegroup_new' => true,
            'resourcegroup_resource_edit' => true,
            'resourcegroup_resource_list' => true,
            'resourcegroup_save' => true,
            'resourcegroup_view' => true,
            'resource_quick_create' => true,
            'resource_quick_update' => true,
            'resource_tree' => true,
            'save' => true,
            'save_category' => true,
            'save_chunk' => true,
            'save_context' => true,
            'save_document' => true,
            'save_plugin' => true,
            'save_propertyset' => true,
            'save_role' => true,
            'save_snippet' => true,
            'save_template' => true,
            'save_tv' => true,
            'save_user' => true,
            'search' => true,
            'set_sudo' => true,
            'settings' => true,
            'sources' => true,
            'source_delete' => true,
            'source_edit' => true,
            'source_save' => true,
            'source_view' => true,
            'steal_locks' => true,
            'tree_show_element_ids' => true,
            'tree_show_resource_ids' => true,
            'undelete_document' => true,
            'unlock_element_properties' => true,
            'unpublish_document' => true,
            'usergroup_delete' => true,
            'usergroup_edit' => true,
            'usergroup_new' => true,
            'usergroup_save' => true,
            'usergroup_user_edit' => true,
            'usergroup_user_list' => true,
            'usergroup_view' => true,
            'view' => true,
            'view_category' => true,
            'view_chunk' => true,
            'view_context' => true,
            'view_document' => true,
            'view_element' => true,
            'view_eventlog' => true,
            'view_offline' => true,
            'view_plugin' => true,
            'view_propertyset' => true,
            'view_role' => true,
            'view_snippet' => true,
            'view_sysinfo' => true,
            'view_template' => true,
            'view_tv' => true,
            'view_unpublished' => true,
            'view_user' => true,
            'workspaces' => true,
          ),
        ),
        4 => 
        array (
          'principal' => 1,
          'authority' => 9999,
          'policy' => 
          array (
            'add_children' => true,
            'create' => true,
            'copy' => true,
            'delete' => true,
            'list' => true,
            'load' => true,
            'move' => true,
            'publish' => true,
            'remove' => true,
            'save' => true,
            'steal_lock' => true,
            'undelete' => true,
            'unpublish' => true,
            'view' => true,
          ),
        ),
      ),
    ),
  ),
);