Requires DB changes: ```sql CREATE TABLE azure_ad_sync_state (id INT AUTO_INCREMENT NOT NULL, title VARCHAR(255) NOT NULL, value LONGTEXT NOT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB; ```pull/5934/head
parent
2c779cbc56
commit
286b61d167
@ -0,0 +1,74 @@ |
||||
<?php |
||||
|
||||
/* For licensing terms, see /license.txt */ |
||||
|
||||
namespace Chamilo\PluginBundle\Entity\AzureActiveDirectory; |
||||
|
||||
use Chamilo\CoreBundle\Traits\TimestampableTypedEntity; |
||||
use Doctrine\ORM\Mapping as ORM; |
||||
|
||||
/** |
||||
* @package Chamilo\PluginBundle\Entity\AzureActiveDirectory |
||||
* |
||||
* @ORM\Table(name="azure_ad_sync_state") |
||||
* @ORM\Entity() |
||||
*/ |
||||
class AzureSyncState |
||||
{ |
||||
use TimestampableTypedEntity; |
||||
|
||||
public const USERS_DATALINK = 'users_datalink'; |
||||
public const USERGROUPS_DATALINK = 'usergroups_datalink'; |
||||
|
||||
/** |
||||
* @var int |
||||
* |
||||
* @ORM\Column(name="id", type="integer") |
||||
* @ORM\Id() |
||||
* @ORM\GeneratedValue() |
||||
*/ |
||||
private int $id = 0; |
||||
|
||||
/** |
||||
* @var string |
||||
* |
||||
* @ORM\Column(name="title", type="string") |
||||
*/ |
||||
private string $title; |
||||
|
||||
/** |
||||
* @var string |
||||
* |
||||
* @ORM\Column(name="value", type="text") |
||||
*/ |
||||
private string $value; |
||||
|
||||
public function getId(): int |
||||
{ |
||||
return $this->id; |
||||
} |
||||
|
||||
public function getTitle(): string |
||||
{ |
||||
return $this->title; |
||||
} |
||||
|
||||
public function setTitle(string $title): AzureSyncState |
||||
{ |
||||
$this->title = $title; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
public function getValue(): string |
||||
{ |
||||
return $this->value; |
||||
} |
||||
|
||||
public function setValue(string $value): AzureSyncState |
||||
{ |
||||
$this->value = $value; |
||||
|
||||
return $this; |
||||
} |
||||
} |
@ -0,0 +1,9 @@ |
||||
<?php |
||||
|
||||
/* For licensing terms, see /license.txt */ |
||||
|
||||
if (!api_is_platform_admin()) { |
||||
exit('You must have admin permissions to uninstall plugins'); |
||||
} |
||||
|
||||
AzureActiveDirectory::create()->uninstall(); |
Loading…
Reference in new issue