*/ | */ | ||||
protected $comment; | protected $comment; | ||||
/** | |||||
* @ORM\OneToMany(targetEntity="Lc\ShopBundle\Context\OrderShopInterface", mappedBy="invoiceAddress") | |||||
*/ | |||||
protected $orders; | |||||
/** | /** | ||||
* @ORM\OneToOne(targetEntity="Lc\ShopBundle\Context\PointSaleInterface", mappedBy="address", cascade={"persist", "remove"}) | * @ORM\OneToOne(targetEntity="Lc\ShopBundle\Context\PointSaleInterface", mappedBy="address", cascade={"persist", "remove"}) | ||||
*/ | */ | ||||
return $this; | return $this; | ||||
} | } | ||||
/** | |||||
* @return Collection|ShopOrder[] | |||||
*/ | |||||
public function getOrders(): Collection | |||||
{ | |||||
return $this->orders; | |||||
} | |||||
public function addOrder(OrderShop $order): self | |||||
{ | |||||
if (!$this->orders->contains($order)) { | |||||
$this->orders[] = $order; | |||||
$order->setInvoiceAddress($this); | |||||
} | |||||
return $this; | |||||
} | |||||
public function removeOrder(OrderShop $order): self | |||||
{ | |||||
if ($this->orders->contains($order)) { | |||||
$this->orders->removeElement($order); | |||||
// set the owning side to null (unless already changed) | |||||
if ($order->getInvoiceAddress() === $this) { | |||||
$order->setInvoiceAddress(null); | |||||
} | |||||
} | |||||
return $this; | |||||
} | |||||
public function getPointSale(): ?PointSale | public function getPointSale(): ?PointSale | ||||
{ | { |
/** | /** | ||||
* @ORM\MappedSuperclass() | * @ORM\MappedSuperclass() | ||||
*/ | */ | ||||
abstract class Product extends AbstractEntity | |||||
abstract class Product extends AbstractDocumentEntity | |||||
{ | { | ||||
/** | /** | ||||
* @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\ProductFamilyInterface", inversedBy="products") | * @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\ProductFamilyInterface", inversedBy="products") |
window.onload = function () { | |||||
/*if (window.CKEDITOR){ | |||||
var path = '/ckfinder/connector'; | |||||
CKFinder.config( { connectorPath: (window.location.pathname.indexOf("app_dev.php") == -1) ? path : '/app_dev.php'+path} ); | |||||
for (var ckInstance in CKEDITOR.instances){ | |||||
CKFinder.setupCKEditor(CKEDITOR.instances[ckInstance]); | |||||
} | |||||
}*/ | |||||
alert('ncihce'); | |||||
} | |||||
CKFinder.config( { connectorPath: '/ckfinder/connector' } ); |
{% block _product_ck_finder_widget %} | |||||
{# ... #} | |||||
<a href="...">More information</a> | |||||
{% endblock %} |
<?php | |||||
namespace Lc\ShopBundle\Services; | |||||
use CKSource\Bundle\CKFinderBundle\Authentication\Authentication as AuthenticationBase; | |||||
class CustomCKFinderAuth extends AuthenticationBase | |||||
{ | |||||
public function authenticate() | |||||
{ | |||||
return true; | |||||
} | |||||
} |