This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| //App/Entity/Order.php | |
| #[ORM\Entity()] | |
| #[ORM\Table(name: '`order`')] | |
| class Order { | |
| #[ORM\OneToMany(targetEntity: OrderItem::class, mappedBy: 'order', cascade: ["persist", "remove"], orphanRemoval: true)] | |
| #[ORM\OrderBy(["position" => "ASC"])] | |
| #[Assert\Valid] | |
| private Collection $items; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace App\Validator; | |
| use Attribute; | |
| use Symfony\Component\Validator\Constraint; | |
| #[Attribute(Attribute::TARGET_PROPERTY)] | |
| class NotAbandoned extends Constraint { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace App\Service; | |
| use Doctrine\Common\Collections\Collection; | |
| use Doctrine\Persistence\ManagerRegistry; | |
| class DuplicateEntityService { | |
| /** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function createStyle(css) { | |
| var head = document.head || document.getElementsByTagName('head')[0], | |
| style = document.createElement('style'); | |
| style.type = 'text/css'; | |
| if (style.styleSheet) { | |
| style.styleSheet.cssText = css; | |
| } else { | |
| style.appendChild(document.createTextNode(css)); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $.fn.setClass = function(classes){ | |
| classes = classes.split(" "); | |
| this.each(function () { | |
| for(var i=0;i<classes.length;i++){ | |
| if (!$(this).hasClass(classes[i])){ | |
| $(this).addClass(classes[i]); | |
| } | |
| } | |
| }); | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Created by PhpStorm. | |
| * User: Jozef Môstka | |
| * Date: 12.5.2017 | |
| * Time: 10:37 | |
| */ | |
| ini_set('max_execution_time', 0); | |
| set_time_limit(0); |