# vikbooking/1.8.13/admin/helpers/src/history/detector/assignees.php

VikBooking Hotel Booking Engine &amp; PMS, version 1.8.13. 69 lines.

- Page: https://pluginprobe.com/plugins/vikbooking/1.8.13/code/admin/helpers/src/history/detector/assignees.php
- Raw: https://pluginprobe.com/plugins/vikbooking/1.8.13/raw/admin/helpers/src/history/detector/assignees.php
- Modified: 2026-06-30T15:55:56+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/vikbooking/1.8.13/code/admin/helpers/src/history/detector/assignees.php#L10-L20`.

```php
<?php
/** 
 * @package     VikBooking
 * @subpackage  core
 * @author      E4J s.r.l.
 * @copyright   Copyright (C) 2025 E4J s.r.l. All Rights Reserved.
 * @license     http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 * @link        https://vikwp.com
 */

// No direct access
defined('ABSPATH') or die('No script kiddies please!');

/**
 * Item assignees changes detector class.
 * 
 * @since 1.18 (J) - 1.8 (WP)
 */
abstract class VBOHistoryDetectorAssignees extends VBOHistoryDetectorArray
{
    /**
     * Class constructor.
     */
    public function __construct(?string $propertyName = null)
    {
        parent::__construct($propertyName ?: 'assignees');
    }

    /**
     * @inheritDoc
     */
    protected function describeAddedItems(array $added)
    {
        $last = array_pop($added);

        if (!$added) {
            // only one item
            return JText::sprintf('VBO_HISTORY_TRACKER_ASSIGNEE_ADDED', $last);
        }
        
        // 2 or more items
        return JText::sprintf('VBO_HISTORY_TRACKER_ASSIGNEES_ADDED', implode(', ', $added), $last);
    }

    /**
     * @inheritDoc
     */
    protected function describeRemovedItems(array $removed)
    {
        $last = array_pop($removed);

        if (!$removed) {
            // only one item
            return JText::sprintf('VBO_HISTORY_TRACKER_ASSIGNEE_REMOVED', $last);
        }
        
        // 2 or more items
        return JText::sprintf('VBO_HISTORY_TRACKER_ASSIGNEES_REMOVED', implode(', ', $removed), $last);
    }

    /**
     * @inheritDoc
     */
    public function getIcon()
    {
        return VikBookingIcons::i('user');
    }
}

```
