for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* @copyright Copyright (c) Flipbox Digital Limited
* @license https://flipboxfactory.com/software/hubspot/license
* @link https://www.flipboxfactory.com/software/hubspot/
*/
namespace flipbox\hubspot\fields\actions;
use craft\base\ElementInterface;
use craft\base\SavableComponent;
use flipbox\hubspot\fields\Objects;
use flipbox\hubspot\records\ObjectAssociation;
* @author Flipbox Factory <[email protected]>
* @since 1.0.0
abstract class AbstractObjectItemAction extends SavableComponent implements ObjectItemActionInterface
{
* The message that should be displayed to the user after the action is performed.
*
* @var string
private $message;
* @inheritdoc
public static function isDestructive(): bool
return false;
}
public function getTriggerLabel(): string
return static::displayName();
public function getTriggerHtml()
return null;
public function getConfirmationMessage()
public function performAction(
Objects $field,
ElementInterface $element,
ObjectAssociation $record
): bool {
return true;
public function getMessage()
return $this->message;
* Sets the message that should be displayed to the user after the action is performed.
* @param string $message The message that should be displayed to the user after the action is performed.
protected function setMessage(string $message)
$this->message = $message;
public function attributes()
return array_merge(
parent::attributes(),
[
'message'
]
);