This file contains hidden or 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 Drupal\<custom_module>\EventSubscriber\Cdf; | |
use Drupal\acquia_contenthub\AcquiaContentHubEvents; | |
use Drupal\acquia_contenthub\Event\CreateCdfEntityEvent; | |
use Symfony\Component\EventDispatcher\EventSubscriberInterface; | |
/** | |
* |
This file contains hidden or 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 | |
/** | |
* To make Content hub work with Drupal 7 content translation module and custom languages (with hyphen in the langcode) | |
* these hook implementations will need to be added to a custom module on the both the publisher and the subscriber site. | |
* Two text fields field_tnid and field_custom_language will also need to be created on the required content types to | |
* carry the tnid and custom language information across. | |
* The fields should be hidden from the node view and node edit form as these should only be used by this code. | |
*/ |
This file contains hidden or 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 | |
use Acquia\ContentHubClient\Entity as ContentHubEntity; | |
use Acquia\ContentHubClient\Attribute; | |
/** | |
* @param \Acquia\ContentHubClient\Entity $contenthub_entity | |
* | |
* Implements hook_acquia_contenthub_cdf_from_drupal_alter() | |
*/ |
This file contains hidden or 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 | |
/** | |
* @Given /^I am viewing a product with the following related products:$/ | |
*/ | |
public function assertRelatedProducts(TableNode $relatedProducts) { | |
// First, create a product. | |
$product = (object) array( | |
'title' => 'Parent Product', | |
'type' => 'product', | |
'uid' => 1, |