'MyResource', 'alias' => 'my-resource', 'description' => 'This is my resource', 'published' => true, 'hidemenu' => false, 'content' => '

My very own Resource

', /* more fields here as desired */ ); $response = $modx->runProcessor('resource/create', $fields); if ($response->isError()) { $modx->log(modX::LOG_LEVEL_ERROR, 'Failed to create Resource'); }