Skip to content

Commit

Permalink
added params
Browse files Browse the repository at this point in the history
  • Loading branch information
weisswurstkanone committed Apr 28, 2021
1 parent e5a54cc commit f7499e0
Show file tree
Hide file tree
Showing 13 changed files with 58 additions and 135 deletions.
3 changes: 2 additions & 1 deletion src/GraphQL/DataObjectMutationFieldConfigGenerator/Base.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,10 @@ public function __construct(Service $graphQlService)
* @param array $nodeDef
* @param ClassDefinition $class
* @param mixed $container
* @param array $params
* @return array
*/
public function getGraphQlMutationFieldConfig($nodeDef, $class, $container = null)
public function getGraphQlMutationFieldConfig($nodeDef, $class, $container = null, $params = [])
{
$processor = new \Pimcore\Bundle\DataHubBundle\GraphQL\DataObjectInputProcessor\Base($nodeDef);
$processor->setGraphQLService($this->getGraphQlService());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,8 @@

class BooleanSelect extends Base
{

/**
* @param $nodeDef
* @param $class
* @param $container
* @return array
*/
public function getGraphQlMutationFieldConfig($nodeDef, $class, $container = null)
/** {@inheritdoc } */
public function getGraphQlMutationFieldConfig($nodeDef, $class, $container = null, $params = [])
{
$processor = new \Pimcore\Bundle\DataHubBundle\GraphQL\DataObjectInputProcessor\Base($nodeDef);
$processor->setGraphQLService($this->getGraphQlService());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,8 @@
class Checkbox extends Base
{

/**
* @param $nodeDef
* @param $class
* @param $container
* @return array
*/
public function getGraphQlMutationFieldConfig($nodeDef, $class, $container = null)
/** {@inheritdoc } */
public function getGraphQlMutationFieldConfig($nodeDef, $class, $container = null, $params = [])
{
$processor = new \Pimcore\Bundle\DataHubBundle\GraphQL\DataObjectInputProcessor\Base($nodeDef);
$processor->setGraphQLService($this->getGraphQlService());
Expand Down
11 changes: 2 additions & 9 deletions src/GraphQL/DataObjectMutationFieldConfigGenerator/Date.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,8 @@

class Date extends Base
{


/**
* @param $nodeDef
* @param $class
* @param $container
* @return array
*/
public function getGraphQlMutationFieldConfig($nodeDef, $class, $container = null)
/** {@inheritdoc } */
public function getGraphQlMutationFieldConfig($nodeDef, $class, $container = null, $params = [])
{
$processor = new \Pimcore\Bundle\DataHubBundle\GraphQL\DataObjectInputProcessor\Date($nodeDef);
$processor->setGraphQLService($this->getGraphQlService());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,9 @@

class ExternalImage extends Base
{
/**
* @param $nodeDef
* @param $class
* @param $container
* @return array
* @throws \Exception
*/
public function getGraphQlMutationFieldConfig($nodeDef, $class, $container = null)

/** {@inheritdoc } */
public function getGraphQlMutationFieldConfig($nodeDef, $class, $container = null, $params = [])
{
$processor = new \Pimcore\Bundle\DataHubBundle\GraphQL\DataObjectInputProcessor\ExternalImage($nodeDef);
$processor->setGraphQLService($this->getGraphQlService());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,8 @@

class Fieldcollections extends Base
{

/**
* @param $nodeDef
* @param $class
* @param $container
* @return array
* @throws \Exception
*/
public function getGraphQlMutationFieldConfig($nodeDef, $class, $container = null)
/** {@inheritdoc } */
public function getGraphQlMutationFieldConfig($nodeDef, $class, $container = null, $params = [])
{
$fieldName = $nodeDef['attributes']['attribute'];

Expand Down
10 changes: 2 additions & 8 deletions src/GraphQL/DataObjectMutationFieldConfigGenerator/Geopoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,8 @@
class Geopoint extends Base
{

/**
* @param $nodeDef
* @param $class
* @param $container
* @return array
* @throws \Exception
*/
public function getGraphQlMutationFieldConfig($nodeDef, $class, $container = null)
/** {@inheritdoc } */
public function getGraphQlMutationFieldConfig($nodeDef, $class, $container = null, $params = [])
{
$processor = new \Pimcore\Bundle\DataHubBundle\GraphQL\DataObjectInputProcessor\Geopoint($nodeDef);
$processor->setGraphQLService($this->getGraphQlService());
Expand Down
74 changes: 33 additions & 41 deletions src/GraphQL/DataObjectMutationFieldConfigGenerator/Image.php
Original file line number Diff line number Diff line change
@@ -1,41 +1,33 @@
<?php

/**
* Pimcore
*
* This source file is available under two different licenses:
* - GNU General Public License version 3 (GPLv3)
* - Pimcore Enterprise License (PEL)
* Full copyright and license information is available in
* LICENSE.md which is distributed with this source code.
*
* @copyright Copyright (c) Pimcore GmbH (http://www.pimcore.org)
* @license http://www.pimcore.org/license GPLv3 and PEL
*/

namespace Pimcore\Bundle\DataHubBundle\GraphQL\DataObjectMutationFieldConfigGenerator;

class Image extends Base
{


/**
* @param $nodeDef
* @param $class
* @param $container
* @return array
* @throws \Exception
*/
public function getGraphQlMutationFieldConfig($nodeDef, $class, $container = null)
{
$processor = new \Pimcore\Bundle\DataHubBundle\GraphQL\DataObjectInputProcessor\Image($nodeDef);
$processor->setGraphQLService($this->getGraphQlService());

return [
'arg' => $this->getGraphQlService()->getDataObjectTypeDefinition("image_input"),
'processor' => [$processor, 'process'],
'description' => "Asset ID"
];
}

}
<?php

/**
* Pimcore
*
* This source file is available under two different licenses:
* - GNU General Public License version 3 (GPLv3)
* - Pimcore Enterprise License (PEL)
* Full copyright and license information is available in
* LICENSE.md which is distributed with this source code.
*
* @copyright Copyright (c) Pimcore GmbH (http://www.pimcore.org)
* @license http://www.pimcore.org/license GPLv3 and PEL
*/

namespace Pimcore\Bundle\DataHubBundle\GraphQL\DataObjectMutationFieldConfigGenerator;

class Image extends Base
{
/** {@inheritdoc } */
public function getGraphQlMutationFieldConfig($nodeDef, $class, $container = null, $params = [])
{
$processor = new \Pimcore\Bundle\DataHubBundle\GraphQL\DataObjectInputProcessor\Image($nodeDef);
$processor->setGraphQLService($this->getGraphQlService());

return [
'arg' => $this->getGraphQlService()->getDataObjectTypeDefinition("image_input"),
'processor' => [$processor, 'process'],
'description' => "Asset ID"
];
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,8 @@ public function __construct(Service$graphQlService, ElementDescriptorInputType $
parent::__construct($graphQlService);
}


/**
* @param $nodeDef
* @param $class
* @param $container
* @return array
* @throws \Exception
*/
public function getGraphQlMutationFieldConfig($nodeDef, $class, $container = null)
/** {@inheritdoc } */
public function getGraphQlMutationFieldConfig($nodeDef, $class, $container = null, $params = [])
{
$processor = new \Pimcore\Bundle\DataHubBundle\GraphQL\DataObjectInputProcessor\ManyToManyObjectRelation($nodeDef);
$processor->setGraphQLService($this->getGraphQlService());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,8 @@ public function __construct(Service$graphQlService, ElementDescriptorInputType $
parent::__construct($graphQlService);
}


/**
* @param $nodeDef
* @param $class
* @param $container
* @return array
* @throws \Exception
*/
public function getGraphQlMutationFieldConfig($nodeDef, $class, $container = null)
/** {@inheritdoc } */
public function getGraphQlMutationFieldConfig($nodeDef, $class, $container = null, $params = [])
{
$processor = new \Pimcore\Bundle\DataHubBundle\GraphQL\DataObjectInputProcessor\ManyToManyRelation($nodeDef);
$processor->setGraphQLService($this->getGraphQlService());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,8 @@
class ManyToOneRelation extends Base
{


/**
* @param $nodeDef
* @param $class
* @param $container
* @return array
* @throws \Exception
*/
public function getGraphQlMutationFieldConfig($nodeDef, $class, $container = null)
/** {@inheritdoc } */
public function getGraphQlMutationFieldConfig($nodeDef, $class, $container = null, $params = [])
{
$processor = new \Pimcore\Bundle\DataHubBundle\GraphQL\DataObjectInputProcessor\ManyToOneRelation($nodeDef);
$processor->setGraphQLService($this->getGraphQlService());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,8 @@

class Multiselect extends Base
{

/**
* @param $nodeDef
* @param Data $fieldDefinition
* @param $class
* @param $container
* @return array
*/
public function getGraphQlMutationFieldConfig($nodeDef, $class, $container = null)
/** {@inheritdoc } */
public function getGraphQlMutationFieldConfig($nodeDef, $class, $container = null, $params = [])
{
$processor = new \Pimcore\Bundle\DataHubBundle\GraphQL\DataObjectInputProcessor\Base($nodeDef);
$processor->setGraphQLService($this->getGraphQlService());
Expand Down
10 changes: 2 additions & 8 deletions src/GraphQL/DataObjectMutationFieldConfigGenerator/Numeric.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,8 @@

class Numeric extends Base
{

/**
* @param $nodeDef
* @param $class
* @param $container
* @return array
*/
public function getGraphQlMutationFieldConfig($nodeDef, $class, $container = null)
/** {@inheritdoc } */
public function getGraphQlMutationFieldConfig($nodeDef, $class, $container = null, $params = [])
{
$processor = new \Pimcore\Bundle\DataHubBundle\GraphQL\DataObjectInputProcessor\Base($nodeDef);
$processor->setGraphQLService($this->getGraphQlService());
Expand Down

0 comments on commit f7499e0

Please sign in to comment.