Open patrickpeng2091 opened 8 years ago
<?php
/**
* @file
* Contains \Drupal\restful_example\Plugin\resource\node\article\v1\Articles__1_0.
*/
namespace Drupal\restful_example\Plugin\resource\node\pen\v1;
use Drupal\restful\Http\RequestInterface;
use Drupal\restful\Plugin\resource\ResourceEntity;
use Drupal\restful\Plugin\resource\ResourceInterface;
use Drupal\restful\Plugin\resource\ResourceNode;
/**
* Class Articles
* @package Drupal\restful\Plugin\resource
*
* @Resource(
* name = "articles:1.0",
* resource = "articles",
* label = "Articles",
* description = "Export the articles with all authentication providers.",
* authenticationTypes = TRUE,
* authenticationOptional = TRUE,
* dataProvider = {
* "entityType": "node",
* "bundles": {
* "article"
* },
* },
* majorVersion = 1,
* minorVersion = 0
* )
*/
class Pens__1_0 extends ResourceNode implements ResourceInterface {}
Did you clear caches after adding the resource?
yes , i clear cache. i modify Code comments can work . but, i don't konw why modify code comments.
sites/all/modules/restful/modules/restful_example/src/Plugin/resource/node/pen/v1/Pens__1_0.php
http://t8.dd:8084/api/v1.0/pens