Last active
August 29, 2015 14:11
-
-
Save johannessteu/9379999aa960f51e2c52 to your computer and use it in GitHub Desktop.
Create a custom FlowQuery
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Vendor\Package\FlowQuery; | |
class ResourceUrlOperation extends \TYPO3\Eel\FlowQuery\Operations\AbstractOperation { | |
/** | |
* {@inheritdoc} | |
* | |
* @var string | |
*/ | |
static protected $shortName = 'custom'; | |
/** | |
* {@inheritdoc} | |
* | |
* @var boolean | |
*/ | |
static protected $final = TRUE; | |
/** | |
* {@inheritdoc} | |
* | |
* @var integer | |
*/ | |
static protected $priority = 100; | |
/** | |
* @Flow\Inject | |
* @var ResourcePublisher | |
*/ | |
protected $resourcePublisher; | |
/** | |
* Explodes a comma-separated string with tags and fetches all assets that are tagged with those tags | |
* | |
* @param \TYPO3\Eel\FlowQuery\FlowQuery $flowQuery the FlowQuery object | |
* @param array $arguments the arguments for this operation | |
* @return mixed|null if the operation is final, the return value | |
*/ | |
public function evaluate(\TYPO3\Eel\FlowQuery\FlowQuery $flowQuery, array $arguments){ | |
// do something | |
return ''; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
result = ${q(node).custom()} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment