Skip to content
Snippets Groups Projects
Select Git revision
  • 8.9.x
  • 11.x default protected
  • 11.2.x protected
  • 10.5.x protected
  • 10.6.x protected
  • 11.1.x protected
  • 10.4.x protected
  • 11.0.x protected
  • 10.3.x protected
  • 7.x protected
  • 10.2.x protected
  • 10.1.x protected
  • 9.5.x protected
  • 10.0.x protected
  • 9.4.x protected
  • 9.3.x protected
  • 9.2.x protected
  • 9.1.x protected
  • 9.0.x protected
  • 8.8.x protected
  • 10.5.2 protected
  • 11.2.3 protected
  • 10.5.1 protected
  • 11.2.2 protected
  • 11.2.1 protected
  • 11.2.0 protected
  • 10.5.0 protected
  • 11.2.0-rc2 protected
  • 10.5.0-rc1 protected
  • 11.2.0-rc1 protected
  • 10.4.8 protected
  • 11.1.8 protected
  • 10.5.0-beta1 protected
  • 11.2.0-beta1 protected
  • 11.2.0-alpha1 protected
  • 10.4.7 protected
  • 11.1.7 protected
  • 10.4.6 protected
  • 11.1.6 protected
  • 10.3.14 protected
40 results

ViewsArgument.php

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    Relationship.php 9.58 KiB
    <?php
    
    namespace Drupal\jsonapi\JsonApiResource;
    
    use Drupal\Component\Utility\NestedArray;
    use Drupal\Core\Cache\CacheableMetadata;
    use Drupal\Core\Field\EntityReferenceFieldItemListInterface;
    use Drupal\Core\Url;
    use Drupal\jsonapi\JsonApiSpec;
    use Drupal\jsonapi\ResourceType\ResourceType;
    use Drupal\jsonapi\Routing\Routes;
    
    /**
     * Represents references from one resource object to other resource object(s).
     *
     * @internal JSON:API maintains no PHP API since its API is the HTTP API. This
     *   class may change at any time and this will break any dependencies on it.
     *
     * @see https://www.drupal.org/project/drupal/issues/3032787
     * @see jsonapi.api.php
     */
    class Relationship implements TopLevelDataInterface {
    
      /**
       * The context resource object of the relationship.
       *
       * A relationship object represents references from a resource object in
       * which it’s defined to other resource objects. Respectively, the "context"
       * of the relationship and the "target(s)" of the relationship.
       *
       * A relationship object's context either comes from the resource object that
       * contains it or, in the case that the relationship object is accessed
       * directly via a relationship URL, from its `self` URL, which should identify
       * the resource to which it belongs.
       *
       * @var \Drupal\jsonapi\JsonApiResource\ResourceObject
       *
       * @see https://jsonapi.org/format/#document-resource-object-relationships
       * @see https://jsonapi.org/recommendations/#urls-relationships
       */
      protected $context;
    
      /**
       * The data of the relationship object.
       *
       * @var \Drupal\jsonapi\JsonApiResource\RelationshipData
       */
      protected $data;
    
      /**
       * The relationship's public field name.
       *
       * @var string
       */
      protected $fieldName;
    
      /**
       * The relationship object's links.
       *
       * @var \Drupal\jsonapi\JsonApiResource\LinkCollection
       */
      protected $links;
    
      /**
       * The relationship object's meta member.
       *
       * @var array
       */
      protected $meta;