Jump to content

Search the Community

Showing results for tags 'symfony2'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 4 results

  1. Europe's biggest gaming company are looking to take on up to 10 PHP Developers to join their expanding development team working on new game releases. They can offer relocation assistance and most interviews take place purely over Skype, or they can fly you over if required. Its an English speaking company and could be making you an offer in the next week! Please email me @ stuart.day@quantica.co.uk asap.
  2. Hi all, I have developed a website for a personal project in a specific language on Symfony2. It usually takes a long time for everything to program because I like to follow safe approaches in developing code, even If it's the silliest things. My plan now, is to implement my directory business website - let's say musical instrument companies - so that everyone from all over the world could create an account and register their business. What I have done, is that I have implemented everything from scratch: A Security bundle, some basic entities like Business {name, location, phone, email, information, etc.}, BusinessCategory {name, information etc.} and some custom but simple relationships between them. The user can successfully register for an account and then register their business. I have also implemented translations for every word or phrase that is being shown on the website by using a locale in config.yml and some custom translations for English and let's say Chinese or Spanish. The user can click on a link "English" or "Spanish" and everything gets translated to selected language and the website alias changes from website.com/en to website.com/es. My next steps are: - I want the user to be able to register in English or Spanish. Right now, there is only one entry for that Business in the mysql database and translations exist only for the website text. I want the user to be able to enter the English data and the Spanish data for the same fields for example the "name" of the business, the address etc. That will need possibly 2 entries with a different locale and the same business. - I want the website to align with label translations currently existing with the user's translations. This means that when you choose "spanish" you will get everything translated in Spanish AND the Spanish row for that business. - I want to use the domains I have purchased for language If possible: Website.com, Website.es, Website.it etc. I would like someone to enter website.it in the address bar of the browser and get automatically everything in Italian. My main concerns are: - If I use the translatable bundle, an additional row will be created for every business. How will they be connected? I mean, the X business with an ID 1234 will be in Spanish and the same one with name translated to Y will have an ID 1235. How will symfony2 know that these two businesses are the same one in a different locale ? - What will happen to the joined tables? The User table is linked to the Business table which is linked to the Group table. If I use the translatable extension for the Business table only, how will it affect the other ones ? Thanks for reading !
  3. I just cranked out my latest Article / Blog type site, lxt.me and wanting some feedback on it. It is very simple just meant for me and was a project that I used to learn more about Symfony2. I am more or less looking for critique on the flow of the site / colors etc, not so much functionality. Thanks!
  4. So, I have been playing round with using doctrine for a while now and have it in some basic projects, but i decided to go back and have an in depth look into what it can do. Ive now decided to switch to symfony 2 as my framework of choice and am looking into what doctrine 2 can do in more depth. One thing i have been trying to get my head around is the many to many relationship within doctrine. I am starting to build a recipe system and am working on the relation between recipe and ingredients which gave me 3 entities, recipe, recipeIngredient and ingredient. The reason i cannot use a direct many to many relation is because i want to store two additional columns in the join table ( unit and quantity ) for each ingredient. The problem i am having at the moment is that the entities persist ok, but the recipe_id in the join table is not inserted. The ingredient saves fine and the ingredient_id is stored as expected. I have tried everything i can think off and been through every thread and website looking for an answer . I am sure it is something completely obvious that i am missing. Please help, below is the code i have so far: <?php namespace Recipe\RecipeBundle\Entity; use Doctrine\ORM\Mapping as ORM; use Doctrine\Common\Collections\ArrayCollection; /** * @ORM\Entity * @ORM\Table(name="recipe") * @ORM\HasLifecycleCallbacks() */ class Recipe{ /** * @ORM\Id * @ORM\Column(type="integer") * @ORM\GeneratedValue(strategy="AUTO") */ protected $id; /** * @ORM\OneToMany(targetEntity="RecipeIngredient", mappedBy="recipe", cascade= {"persist"}) */ protected $ingredients; /** * @ORM\Column(type="string") * @var string $title * */ protected $title; /** * Constructor */ public function __construct() { $this->ingredients = new \Doctrine\Common\Collections\ArrayCollection(); } /** * Get id * * @return integer */ public function getId() { return $this->id; } /** * Add ingredients * * @param \Recipe\RecipeBundle\Entity\RecipeIngredient $ingredients * @return Recipe */ public function addIngredient(\Recipe\RecipeBundle\Entity\RecipeIngredient $ingredients) { $ingredients->setRecipe($this); $this->ingredients[] = $ingredients; return $this; } /** * Remove ingredients * * @param \Recipe\RecipeBundle\Entity\RecipeIngredient $ingredients */ public function removeIngredient(\Recipe\RecipeBundle\Entity\RecipeIngredient $ingredients) { $this->ingredients->removeElement($ingredients); } /** * Get ingredients * * @return \Doctrine\Common\Collections\Collection */ public function getIngredients() { return $this->ingredients; } /** * Set title * * @param string $title * @return Recipe */ public function setTitle($title) { $this->title = $title; return $this; } /** * Get title * * @return string */ public function getTitle() { return $this->title; } } and recipeIngredient /** * @ORM\Id * @ORM\Column(type="integer") * @ORM\GeneratedValue(strategy="AUTO") */ protected $id; /** * @ORM\ManyToOne(targetEntity="Recipe", inversedBy="ingredients") * */ protected $recipe; /** * @ORM\ManyToOne(targetEntity="Ingredient", inversedBy="ingredients" , cascade={"persist"}) * */ protected $ingredient; /** * @ORM\Column(type="string") * @var string $quantity * */ protected $quantity; /** * @ORM\Column(type="string") * @var string $unit * */ protected $unit; /** * Get id * * @return integer */ public function getId() { return $this->id; } /** * Set quantity * * @param string $quantity * @return RecipeIngredient */ public function setQuantity($quantity) { $this->quantity = $quantity; return $this; } /** * Get quantity * * @return string */ public function getQuantity() { return $this->quantity; } /** * Set unit * * @param string $unit * @return RecipeIngredient */ public function setUnit($unit) { $this->unit = $unit; return $this; } /** * Get unit * * @return string */ public function getUnit() { return $this->unit; } /** * Set recipe * * @param \Recipe\RecipeBundle\Entity\Recipe $recipe * @return RecipeIngredient */ public function setRecipe(\Recipe\RecipeBundle\Entity\Recipe $recipe = null) { $this->recipe = $recipe; return $this; } /** * Get recipe * * @return \Recipe\RecipeBundle\Entity\Recipe */ public function getRecipe() { return $this->recipe; } /** * Set ingredient * * @param \Recipe\RecipeBundle\Entity\Ingredient $ingredient * @return RecipeIngredient */ public function setIngredient(\Recipe\RecipeBundle\Entity\Ingredient $ingredient = null) { $this->ingredient = $ingredient; return $this; } /** * Get ingredient * * @return \Recipe\RecipeBundle\Entity\Ingredient */ public function getIngredient() { return $this->ingredient; } }
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.