You are here

RestfulTestArticlesResource__1_3.class.php in RESTful 7

Contains RestfulExampleArticlesResource__1_3.

File

tests/modules/restful_test/plugins/restful/node/test_articles/1.3/RestfulTestArticlesResource__1_3.class.php
View source
<?php

/**
 * @file
 * Contains RestfulExampleArticlesResource__1_3.
 */
class RestfulTestArticlesResource__1_3 extends RestfulEntityBaseNode {

  /**
   * {@inheritdoc}
   */
  public static function controllersInfo() {
    $info = parent::controllersInfo();
    $info['^.*$'][\RestfulInterface::GET] = array(
      'callback' => 'viewEntities',
      'access callback' => 'accessViewEntityFalse',
    );
    $info['^.*$'][\RestfulInterface::HEAD] = array(
      'callback' => 'viewEntities',
      'access callback' => 'accessViewEntityTrue',
    );
    return $info;
  }

  /**
   * Custom access callback for the GET method.
   *
   * @return boolean
   *   TRUE for access granted, FALSE otherwise.
   */
  protected function accessViewEntityFalse() {
    return FALSE;
  }

  /**
   * Custom access callback for the HEAD method.
   *
   * @return boolean
   *   TRUE for access granted, FALSE otherwise.
   */
  protected function accessViewEntityTrue() {
    return TRUE;
  }

}

Classes

Namesort descending Description
RestfulTestArticlesResource__1_3 @file Contains RestfulExampleArticlesResource__1_3.