 time to let sad moments sink in as they quickly come in with some humor to keep the movie feeling light. While a nice way to keep the movie going, this does create problems with trying to feel and worry for the characters. I mean, we know the Lone Ranger isn’t going to be killed but at the very least lead me on a few times or let me see him grieving over something painful and not just insert something funny to move onto the next scene.
Overall the movie is a fun ride that will have both kids and adults cheering and laughing along. A definite must for Pirates and western fans alike.
Q: Symfony2 upload file with stof uploadable extension i'm trying to set up a form with file upload under Symfony2 with the uploadable extension (stof/doctrine)
here are my entities
club
<?php  
...  
class Club  
{  
...
/**  
 * @ORM\ManyToOne(targetEntity="my\TestBundle\Entity\File", cascade={"persist"})  
 * @ORM\JoinColumn(nullable=true)  
 */  
private $logo;  
...  
}

file
<?php  
...  
use Gedmo\Mapping\Annotation as Gedmo;
use Doctrine\ORM\Mapping as ORM; 
...  
/**
 * File
 *
 * @ORM\Table()
 * @ORM\Entity(repositoryClass="my\TestBundle\Entity\FileRepository")
 * @ORM\HasLifecycleCallbacks()
 * @Gedmo\Uploadable(pathMethod="getPath", callback="myCallbackMethod", filenameGenerator="SHA1", allowOverwrite=true, appendNumber=true)
 */
class File  
{  
...

/**
 * @var string
 *
 * @ORM\Column(name="name", type="string", length=255)
 * @Gedmo\UploadableFileName
 */
private $name;

...

my form type
clubType
$builder->add('logo', new FileType())

fileType
$builder->add('name', 'file', array(
           'required' => false,
        ))

my controller
$form = $this->createForm('my_testbundle_club', $club);
$request = $this->get('request');
    if ($request->getMethod() == 'POST') {
        $form->submit($request);

        if ($form->isValid()) {
            $em = $this->getDoctrine()->getManager();
            $em->persist($club);
            $em->flush();
        }
    }

but when i submit my form without uploading anything (upload is not mandatory), i've an error saying that column name in table File cannot be null
but i want that the upload is optional, but if there is an upload, name is mandatory
How can i achieve that?
Thanks in advance.

A: In your controller, before flushing, you have to add :
if ($club->getLogo()->getPath() instanceof \Symfony\Component\HttpFoundation\File\UploadedFile) {
    $uploadManager = $this->get('stof_doctrine_extensions.uploadable.manager');
    $uploadManager->markEntityToUpload($club->getLogo(), $club->getLogo()->getPath());
}

When uploading a new file, getPath return an instance of uploaded file, if not, it's a string for already saved file or null
see https://github.com/stof/StofDoctrineExtensionsBundle/blob/master/Resources/doc/index.rst#using-uploadable-extension
This collection includes eight Christmas bookmarks, with black and white checkered borders, a penguin with a winter scarf and top hat, Santa Claus...
This collection includes four beautiful bookmarks, all on one 11" x 8.5" sheet, with intricate floral patterns and the following...
This collection includes four Christmas bookmarks - one with a snowman, snowflakes, and "Let It Snow" word art, one with Santa hats,...
This collection includes five pretty sunflower bookmarks, all on one 11" x 8.5" sheet, with polka dot and...
This HUGE collection includes 30 Valentine bookmarks (15 with patterns, and 15 with patterns and white text boxes). Designs include: hearts,...In looking at these slides and weighing the evidence for life on Mars as microfossils in ALH 84001, it is dangerous to look at only part of the available evidence. There have been many false leads in the search for life in the solar system, and it is easy to fool ourselves by seeing what we want to see or expect to see. For instance, some scientists have suggested that life came to Earth as spores or seeds on dust particles in the early solar system. This image shows one such particle, a piece of interplanetary dust about 15 micrometers across. These particles are collected high in the Earth’s atmosphere as part of NASA’s study of the solar system. The surface of this particular dust particle looks “wormy,” as if it were covered by bacteria like those in slide #27. It would be tempting to say that these were alien microfossils, except that the “worms” here are crystals of iron sulfide minerals, and the particle contains almost no carbon.
Attitudes Toward Solidarity, Risk, and Insurance in the Rural Philippines
SOCIAL REINSURANCE: A NEW APPROACH TO SUSTAINABLE COMMUNITY HEALTH FINANCING, Dror D.M., Preker A.S., eds., pp. 377-394, World Bank & ILO, 2002
18 Pages Posted: 19 Oct 2007
Abstract
A sustainable health reinsurance system can be fashioned for the informal sector by mobilizing social and economic forces operating within individual communities. The economic analysis in part 1 of this book draws conclusions from success stories in industrial countries and failures in low- and medium-income countries. This analysis leads to the premise that decentralized development of microinsurance units, operating in a market segment left out by for-profit health insurance firms and by national schemes, can be stabilized financially through their affiliation with a reinsurance facility-Social Re' (part 1, this volume; Dror and Duru 2000, pp. 30-40; Dror 2001).
Dror, Preker, and Jakab, in chapter 2 of this book, explain how the sociological dimension would theoretically affect the performance of a microinsurer. Findings of the Institute of Medicine reaffirm the active interplay of biology, psychology, behavior, and society in determining people's health attitudes. The institute further reports that, although people's attitudes and actions can readily be altered, these changes need support and reinforcement over time to guarantee better health. Attitudinal and behavioral changes are best prolonged through interventions at multiple levels, from the individual to society at large (Institute of Medicine 2001, pp. 1-1-1-8).
Efforts are required to address the psychosocial factors that influence health status, including, for example, proposing measures such as microinsurance to persuade individuals to accept a healthy way of life and permanently modify their health behavior. Microinsurance schemes provide individuals, households, and communities mechanisms for financing their health through group risk-pooling mechanisms, leading to a sustained improvement in their access to health services.
Higher up on the social scale, well-evaluated interventions at the organizational level should be encouraged, giving credit to organizations' vital role in influencing individual behavioL Still farther up the scale, community involvement in health-promotion strategies should not be overlooked, because some disease-related factors that are beyond an individual's capacity to modify can be significantly minimized through community efforts. Community empowerment, social support, and other values that protect members from stress are strengthened through community-level interventions. Finally, interventions at the societal level recognize the role of collective organizations influencing individuals' everyday existence (Institute of Medicine 2001, pp. 1-1-1-8).
Underlying assumptions are that members' affiliation with microinsurers is voluntary (individuals can join, stay enrolled, or withdraw at will) and that microinsurers will voluntarily join Social Re. A clue is therefore needed about the considerations that shape individual and collective choices. According to one opinion, The underlying economic motivation for joining a microinsurance unit is assumed to be a desire to seek reciprocity in sustaining risk-sharing arrangements among essentially self-interested individuals (Dror and jacquier 1999, p. 79). This assumption implies that joining a microinsurance unit (and Social Re) is a predictable, rational economic choice by self-interested individuals to maximize total utility (optimal choice theory), and an act of reciprocity, in which giving and getting are somehow linked. According to the utility motive, people will join if they can benefit from joining. However, considering that many people will pay a health insurance premium without getting any cash benefits (if they stay healthy), is it really clear what each individual would consider as his or her exact utility from being insured? As Herrnstein points out, because utility cannot be directly observed, it must be inferred from behavior, from the choices individuals make. Thus, utility is synonymous with the modem concept of reinforcement in behavioral psychology (Herrnstein 1997, p. 226). Dror and Jacquier mention a second motive for joining a microinsurance unit: people's desire to improve their health by controlling their living and working conditions. This control is linked to a deep-rooted human need to seek voluntary and repeated interaction with