Skip to content

Commit

Permalink
New bundle gathering all SQLI bundles
Browse files Browse the repository at this point in the history
Signed-off-by: daverner <daverner@sqli.com>
  • Loading branch information
daverner committed May 28, 2020
1 parent 20868b7 commit 20f6543
Show file tree
Hide file tree
Showing 35 changed files with 8,318 additions and 2 deletions.
51 changes: 51 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Cache and logs (Symfony2)
/app/cache/*
/app/logs/*
!app/cache/.gitkeep
!app/logs/.gitkeep

# Email spool folder
/app/spool/*

# Cache, session files and logs (Symfony3)
/var/cache/*
/var/logs/*
/var/sessions/*
!var/cache/.gitkeep
!var/logs/.gitkeep
!var/sessions/.gitkeep

# Parameters
/app/config/parameters.yml
/app/config/parameters.ini

# Managed by Composer
/app/bootstrap.php.cache
/var/bootstrap.php.cache
/bin/*
!bin/console
!bin/symfony_requirements
/vendor/

# Assets and user uploads
/web/bundles/
/web/uploads/

# PHPUnit
/app/phpunit.xml
/phpunit.xml

# Build data
/build/

# Composer PHAR
/composer.phar

# Backup entities generated with doctrine:generate:entities command
**/Entity/*~

# Embedded web-server pid file
/.web-server-pid

# PHPStorm
/.idea/
82 changes: 82 additions & 0 deletions Annotations/Annotation/Entity.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
<?php

namespace SQLI\EzToolboxBundle\Annotations\Annotation;

use Doctrine\Common\Annotations\Annotation;

/**
* @package SQLI\EzToolboxBundle\Annotations
*
* @Annotation
* @Target({"CLASS"})
*/
final class Entity implements SQLIClassAnnotation
{
/** @var bool */
public $create = false;
/** @var bool */
public $update = false;
/** @var bool */
public $delete = false;
/** @var string */
public $description = "";
/** @var int */
public $max_per_page = 10;
/** @var bool */
public $csv_exportable = false;
/** @var string */
public $tabname = "default";

/**
* @return bool
*/
public function isCreate(): bool
{
return $this->create;
}

/**
* @return bool
*/
public function isUpdate(): bool
{
return $this->update;
}

/**
* @return bool
*/
public function isDelete(): bool
{
return $this->delete;
}

/**
* @return string
*/
public function getDescription(): string
{
return $this->description;
}

/**
* @return int
*/
public function getMaxPerPage(): int
{
return $this->max_per_page;
}

/**
* @return bool
*/
public function isCSVExportable(): bool
{
return $this->csv_exportable;
}

public function getTabname(): string
{
return $this->tabname;
}
}
68 changes: 68 additions & 0 deletions Annotations/Annotation/EntityProperty.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
<?php

namespace SQLI\EzToolboxBundle\Annotations\Annotation;

use Doctrine\Common\Annotations\Annotation;

/**
* @package SQLI\EzToolboxBundle\Annotations
*
* @Annotation
* @Target({"PROPERTY"})
*/
final class EntityProperty implements SQLIPropertyAnnotation
{
/** @var bool */
public $visible = true;
/** @var bool */
public $readonly = false;
/** @var string */
public $description = "";
/** @var array */
public $choices = null;
/**
* @var string
* @Enum({"content", "location", "tag"})
*/
public $extra_link = null;

/**
* @return bool
*/
public function isVisible(): bool
{
return $this->visible;
}

/**
* @return bool
*/
public function isReadonly(): bool
{
return $this->readonly;
}

/**
* @return string
*/
public function getDescription(): string
{
return $this->description;
}

/**
* @return array|null
*/
public function getChoices()
{
return $this->choices;
}

/**
* @return string
*/
public function getExtraLink()
{
return $this->extra_link;
}
}
7 changes: 7 additions & 0 deletions Annotations/Annotation/SQLIClassAnnotation.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php

namespace SQLI\EzToolboxBundle\Annotations\Annotation;

interface SQLIClassAnnotation
{
}
7 changes: 7 additions & 0 deletions Annotations/Annotation/SQLIPropertyAnnotation.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php

namespace SQLI\EzToolboxBundle\Annotations\Annotation;

interface SQLIPropertyAnnotation
{
}
Loading

0 comments on commit 20f6543

Please sign in to comment.