标签: drupal-services

Drupal 7 - 无法显示服务端点

我在我的智慧的尽头试图破译为什么这不起作用。我正在尝试从我的 Drupal 7 实例设置一个 REST 服务器。目前专注于不需要身份验证(一旦我设法让它说话,我就会设置它)。

这是相关的代码位:

mymodule.module

/**
 * Implements hook_ctools_plugin_api().
 * Declares the mymodule services endpoint (stored in
 * mymodule.services.inc).  Note that the referenced ctools
 * hook obviates creating this endpoint through the UI.
 */
function mymodule_ctools_plugin_api($owner, $api) {
  if ($owner == 'services' && $api == 'services') {
    return array(
      'version' => 3,
      'file' => 'mymodule.services.inc',
      'path' => drupal_get_path('module', 'mymodule'),
    );
  }
}
/**
 * Implements hook_services_resources
 * Defines the resources available via services module (REST, in this …
Run Code Online (Sandbox Code Playgroud)

php drupal drupal-7 drupal-services

3
推荐指数
1
解决办法
1074
查看次数

Drupal仅作为Services层

Drupal的Services层可以获取节点等,但有没有办法将Drupal限制为一个Services层,其中前端完全不是Drupal/PHP.有没有办法防止Drupal在任何地方提货,只有非drupal接口加载,然后通过Services层与Drupal通信?

drupal drupal-modules drupal-services

2
推荐指数
1
解决办法
302
查看次数

标签 统计

drupal ×2

drupal-services ×2

drupal-7 ×1

drupal-modules ×1

php ×1