I hereby claim:
- I am e0ipso on github.
- I am e0ipso (https://keybase.io/e0ipso) on keybase.
- I have a public key whose fingerprint is 1AC6 C4F0 DE21 355A 8D1F FE1E 3ED2 1A07 EE8E 660B
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
<?php | |
namespace Drupal\jsonapi\ParamConverter; | |
use Drupal\Core\Entity\EntityInterface; | |
use Drupal\Core\ParamConverter\EntityConverter; | |
use Drupal\Core\TypedData\TranslatableInterface; | |
use Symfony\Cmf\Component\Routing\RouteObjectInterface; | |
use Symfony\Component\Routing\Route; |
<?php | |
namespace Drupal\jsonapi\ParamConverter; | |
use Drupal\Core\Entity\EntityInterface; | |
use Drupal\Core\ParamConverter\EntityConverter; | |
use Drupal\Core\TypedData\TranslatableInterface; | |
use Symfony\Cmf\Component\Routing\RouteObjectInterface; | |
use Symfony\Component\Routing\Route; |
<?php | |
/** | |
* @file | |
* Contains Drupal\my_module\MyModuleServiceProvider | |
*/ | |
namespace Drupal\my_module; | |
use Drupal\Core\DependencyInjection\ContainerBuilder; |
/** | |
* Class that holds a read only property. | |
*/ | |
class PropertyBag { | |
/** | |
* Accessor. | |
* | |
* @return {string} | |
* The value. This annotation can be used for type hinting purposes. |
<?php | |
$bundle = 'article'; | |
$entity_type = 'node'; | |
$field = 'body'; | |
$column = 'value'; | |
print init_query($entity_type, $bundle) | |
->count() | |
->execute() . ' entities.' . PHP_EOL; |
This extension allows you to alter or create the contents of the relationships
of a resource with a single operation. In order to control how the
relationships, and their relationships in turn, are affected by the request
this extension reserves the keyword subrequest
inside of the meta
of any
relationship
. The contents of the subrequest
property MUST be a
request object.
The request object MUST NOT be present if the relationship item is not being altered or created via POST
, PUT
or PATCH
.
<?php | |
/** | |
* @file | |
* Contains \Drupal\restful\Util\PersistableCache. | |
*/ | |
namespace Drupal\restful\Util; | |
class PersistableCache implements PersistableCacheInterface { |
This extension provides documentation on how to filter based on relationships.
Given a requested resource (resource
from now on) that contains several relationships (rel1
, rel2
, … from now on), you can apply filters on the resource
based on conditions on rel1
, rel2
, … The default behavior is to filter the elements on resource
, unless otherwise is specified.
The following request returns only the resource entities that contain a relationship that meets the filter:
GET /resource?filter[rel1.conditionField][value]=value1
<?php | |
class A { | |
const C = 'Class A'; | |
public static function constantSelf() { | |
print self::C . PHP_EOL; | |
} |