<commit_before><?php

namespace Ojs\JournalBundle\Entity;

use APY\DataGridBundle\Grid\Mapping as GRID;
use Doctrine\Common\Collections\ArrayCollection;
use JMS\Serializer\Annotation\ExclusionPolicy;
use JMS\Serializer\Annotation\Expose;
use Ojs\CoreBundle\Entity\GenericEntityTrait;
use Ojs\CoreBundle\Params\PublisherStatuses;
use Ojs\UserBundle\Entity\User;
use OkulBilisim\LocationBundle\Entity\Country;
use OkulBilisim\LocationBundle\Entity\Province;
use Prezent\Doctrine\Translatable\Annotation as Prezent;
use Prezent\Doctrine\Translatable\Entity\AbstractTranslatable;

/**
 * Publisher
 * @ExclusionPolicy("all")
 * @GRID\Source(columns="id,name,email,verified")
 * @GRID\Source(columns="id,name,status", groups={"application"})
 */
class Publisher extends AbstractTranslatable
{
    use GenericEntityTrait;

    /**
     * @var integer
     * @Expose
     * @GRID\Column(title="id")
     */
    protected $id;
    /**
     * @Prezent\Translations(targetEntity="Ojs\JournalBundle\Entity\PublisherTranslation")
     */
    protected $translations;

    /**
     * @var Publisher
     * @Expose
     * @GRID\Column(title="parent")
     */
    private $lft;
    private $lvl;
    private $rgt;
    private $root;
    private $parent;
    /**
     * @var ArrayCollection|Publisher[]
     */
    private $children;
    /**
     * @var string
     * @Expose
     * @GRID\Column(title="name")
     */
    private $name;
    /**
     * @var string
     * @Expose
     */
    private $address;
    /**
     * @var string
     * @Expose
     */
    private $about;
    /**
     * @var string
     * @Expose
     * @GRID\Column(field="city",title="city")
     */
    private $city;
    /**
     * @var Country
     * @Expose
     * @GRID\Column(field="country.name",title="country")
     */
    private $country;
    /**
     * @var string
     * @Expose
     */
    private $addressLat;
    /**
     * @var string
     * @Expose
     */
    private $addressLong;
    /**
     * @var string
     * @Expose
     */
    private $phone;
    /**
     * @var string
     * @Expose
     */
    private $fax;
    /**
     * @var string
     * @Expose
     */
    private $email;
    /**
     * @var string
     * @Expose
     */
    private $url;
    /**
     * @var string
     * @Expose
     */
    private $wiki;
    /**
     * @var string
     * @Expose
     */
    private $logo;
    /**
     * @var string
     * @Expose
     */
    private $header;
    /**
     * @var string
     * @Expose
     */
    private $domain;
    /**
     * @var Journal[]|ArrayCollection
     */
    private $journals;
    /**
     * @var string
     */
    private $slug;
    /**
     * @var PublisherTypes
     */
    private $publisherType;

    /**
     * @var PublisherTheme
     */
    private $theme;
    /**
     * @var integer
    /**
     * @var PublisherTheme
     */
    private $design;
    /**
     * @var PublisherTheme[]|ArrayCollection
     * @Expose
     */
    private $publisherThemes;
    /**
     * @var PublisherDesign[]|ArrayCollection
     * @Expose
     */
    private $publisherDesigns;
    /**
     * @var boolean
     * @GRID\Column(title="verified")
     */
    private $verified = false;
    private $status = 0;
    /**
     * @var ArrayCollection|User[]
     */
    private $publisherManagers;

    /**
     * List of Publisher Status
     * @var array
     */
    public static $statuses = array(
        PublisherStatuses::STATUS_REJECTED => 'application.status.rejected',
        PublisherStatuses::STATUS_ONHOLD => 'application.status.onhold',
        PublisherStatuses::STATUS_COMPLETE => 'application.status.complete',
    );

    public function __construct()
    {
        $this->journals = new ArrayCollection();
        $this->translations = new ArrayCollection();
        $this->publisherThemes = new ArrayCollection();
        $this->publisherDesigns = new ArrayCollection();
        $this->publisherManagers = new ArrayCollection();
    }

    /**
     * @return int
     */<commit_msg>expose status field on admin publisher grid<commit_after><?php

namespace Ojs\JournalBundle\Entity;

use APY\DataGridBundle\Grid\Mapping as GRID;
use Doctrine\Common\Collections\ArrayCollection;
use JMS\Serializer\Annotation\ExclusionPolicy;
use JMS\Serializer\Annotation\Expose;
use Ojs\CoreBundle\Entity\GenericEntityTrait;
use Ojs\CoreBundle\Params\PublisherStatuses;
use Ojs\UserBundle\Entity\User;
use OkulBilisim\LocationBundle\Entity\Country;
use OkulBilisim\LocationBundle\Entity\Province;
use Prezent\Doctrine\Translatable\Annotation as Prezent;
use Prezent\Doctrine\Translatable\Entity\AbstractTranslatable;

/**
 * Publisher
 * @ExclusionPolicy("all")
 * @GRID\Source(columns="id,name,email,verified,status")
 * @GRID\Source(columns="id,name,status", groups={"application"})
 */
class Publisher extends AbstractTranslatable
{
    use GenericEntityTrait;

    /**
     * @var integer
     * @Expose
     * @GRID\Column(title="id")
     */
    protected $id;
    /**
     * @Prezent\Translations(targetEntity="Ojs\JournalBundle\Entity\PublisherTranslation")
     */
    protected $translations;

    /**
     * @var Publisher
     * @Expose
     * @GRID\Column(title="parent")
     */
    private $lft;
    private $lvl;
    private $rgt;
    private $root;
    private $parent;
    /**
     * @var ArrayCollection|Publisher[]
     */
    private $children;
    /**
     * @var string
     * @Expose
     * @GRID\Column(title="name")
     */
    private $name;
    /**
     * @var string
     * @Expose
     */
    private $address;
    /**
     * @var string
     * @Expose
     */
    private $about;
    /**
     * @var string
     * @Expose
     * @GRID\Column(field="city",title="city")
     */
    private $city;
    /**
     * @var Country
     * @Expose
     * @GRID\Column(field="country.name",title="country")
     */
    private $country;
    /**
     * @var string
     * @Expose
     */
    private $addressLat;
    /**
     * @var string
     * @Expose
     */
    private $addressLong;
    /**
     * @var string
     * @Expose
     */
    private $phone;
    /**
     * @var string
     * @Expose
     */
    private $fax;
    /**
     * @var string
     * @Expose
     */
    private $email;
    /**
     * @var string
     * @Expose
     */
    private $url;
    /**
     * @var string
     * @Expose
     */
    private $wiki;
    /**
     * @var string
     * @Expose
     */
    private $logo;
    /**
     * @var string
     * @Expose
     */
    private $header;
    /**
     * @var string
     * @Expose
     */
    private $domain;
    /**
     * @var Journal[]|ArrayCollection
     */
    private $journals;
    /**
     * @var string
     */
    private $slug;
    /**
     * @var PublisherTypes
     */
    private $publisherType;

    /**
     * @var PublisherTheme
     */
    private $theme;
    /**
     * @var integer
    /**
     * @var PublisherTheme
     */
    private $design;
    /**
     * @var PublisherTheme[]|ArrayCollection
     * @Expose
     */
    private $publisherThemes;
    /**
     * @var PublisherDesign[]|ArrayCollection
     * @Expose
     */
    private $publisherDesigns;
    /**
     * @var boolean
     * @GRID\Column(title="verified")
     */
    private $verified = false;

    /**
     * @var int
     * @Grid\Column(field="status", title="status", filter="select", selectFrom="values", values={
     *     "-1"="application.status.rejected",
     *     "0"="application.status.onhold",
     *     "1"="application.status.complete"
     * })
     */
    private $status = 0;
    /**
     * @var ArrayCollection|User[]
     */
    private $publisherManagers;

    /**
     * List of Publisher Status
     * @var array
     */
    public static $statuses = array(
        PublisherStatuses::STATUS_REJECTED => 'application.status.rejected',
        PublisherStatuses::STATUS_ONHOLD => 'application.status.onhold',
        PublisherStatuses::STATUS_COMPLETE => 'application.status.complete',
    );

    public function __construct()
    {
        $this->journals = new ArrayCollection();
        $this->translations = new ArrayCollection();
        $this->publisherThemes = new ArrayCollection();
        $this->publisherDesigns = new ArrayCollection();
        $this->publisherManagers = new ArrayCollection();
    }

    /**
     * @return int
     */
{'fraction_non_alphanumeric': 0.14359466922799857, 'fraction_numerical': 0.0006003121623244087, 'mean_word_length': 2.145770392749245, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3821455', 'n_tokens_mistral': 2654, 'n_tokens_neox': 2618, 'n_words': 468}