- Implemented TargetType form for managing target details including name, type, priority, stages, estimated size, profile criteria, pain points, value proposition, and preferred channels. - Created migration scripts for adding type and priority columns to plan objectives and tasks. - Added migration for creating plan targets and plan target stages tables, including foreign key constraints. - Introduced stakeholder management with forms and views for creating, editing, and listing stakeholders. - Enhanced UI with read more functionality for long text descriptions and filtering options in plan tab tables.
48 lines
1.0 KiB
PHP
48 lines
1.0 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace MauticPlugin\PlanBundle\Entity;
|
|
|
|
use Mautic\CoreBundle\Entity\CommonRepository;
|
|
|
|
/**
|
|
* @extends CommonRepository<Stakeholder>
|
|
*/
|
|
class StakeholderRepository extends CommonRepository
|
|
{
|
|
use CountsItemsByTypeTrait;
|
|
|
|
public function getTableAlias(): string
|
|
{
|
|
return 'ps';
|
|
}
|
|
|
|
/**
|
|
* The list's search box matches the name, email, role and type.
|
|
*
|
|
* @param array<int, mixed> $filter
|
|
*
|
|
* @return array<int, mixed>
|
|
*/
|
|
protected function addCatchAllWhereClause($q, $filter): array
|
|
{
|
|
return $this->addStandardCatchAllWhereClause($q, $filter, [
|
|
$this->getTableAlias().'.name',
|
|
$this->getTableAlias().'.email',
|
|
$this->getTableAlias().'.role',
|
|
$this->getTableAlias().'.type',
|
|
]);
|
|
}
|
|
|
|
/**
|
|
* @return array<array{0: string, 1: string}>
|
|
*/
|
|
protected function getDefaultOrder(): array
|
|
{
|
|
return [
|
|
[$this->getTableAlias().'.name', 'ASC'],
|
|
];
|
|
}
|
|
}
|