1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- <?php
- use Drupal\janrain_views\Api;
- use Drupal\janrain_views\EntityType;
- /**
- * @file
- * Empty file needed for Drupal to register the module.
- */
- function janrain_views_menu() {
- $items = array();
- $items['jv/entityType'] = array(
- 'title' => 'Entity types',
- 'page callback' => 'janrain_views_page_entityType_list',
- 'access arguments' => array('administer site configuration'),
- );
- $items['jv/entityType/%jv_entity_type'] = array(
- 'title' => 'Entity type info',
- 'page callback' => 'janrain_views_page_entityType',
- 'page arguments' => array(2),
- 'access arguments' => array('administer site configuration'),
- );
- $items['jv/entityType/%jv_entity_type/access'] = array(
- 'title' => 'Entity type access info',
- 'page callback' => 'janrain_views_page_entityType_accessSchema',
- 'page arguments' => array(2),
- 'access arguments' => array('administer site configuration'),
- );
- $items['jv/settings/keys'] = array(
- 'title' => 'Settings/keys',
- 'page callback' => 'janrain_views_page_settings_keys',
- 'access arguments' => array('administer site configuration'),
- );
- return $items;
- }
- function janrain_views_admin_pages() {
- $ret = array(
- 'jv/*' => TRUE,
- );
- return $ret;
- }
- function janrain_views_page_entityType_list() {
- EntityType::bind(new Api());
- $ret = EntityType::getList();
- dsm($ret);
- return "fo";
- }
- function jv_entity_type_load($name) {
- return filter_xss($name);
- }
- function janrain_views_page_entityType($type_name) {
- EntityType::bind(new Api());
- $ret = EntityType::getEntityType($type_name);
- dsm($ret);
- return $ret;
- }
- function janrain_views_page_entityType_accessSchema($type_name) {
- EntityType::bind(new Api());
- $ret = EntityType::getAccessSchema($type_name);
- dsm($ret);
- return $ret;
- }
- function janrain_views_page_settings_keys() {
- $api = new Api();
- $ret = $api('settings/keys');
- dsm($ret);
- return "<pre>" . var_export($ret, TRUE) . "</pre>";
- }
|