This file contains 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
public function configure() | |
{ | |
parent::configure(); | |
unset($this['id']); | |
unset($this['uuid'], $this['video_media'], $this['audio_media'], $this['photo_media'], $this['gallery_media']); | |
unset($this['created_at'], $this['updated_at']); | |
$gal_widget_opts = array('multiple' => true, 'model' => 'majaxMediaGallery'); | |
if ($this->getObject()->getType() == 'Gallery') | |
{ | |
$gal_widget_opts['exclude'] = $this->getObject()->getObject()->id; |
This file contains 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
$f = new majaxMediaRegistryEntryEmbeddedForm($this->getObject()->MediaRegistryEntry); | |
$f->updateDefaultsFromObject(); | |
$this->embedMergeForm('media', $f); |
This file contains 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
public function isValid() | |
{ | |
return true; | |
} | |
public function processValues($values) | |
{ | |
$this->values = parent::processValues($values); | |
$this->isBound = true; | |
return $this->values; | |
} |
This file contains 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
public function saveEmbeddedForms($con = null, $forms = null) | |
{ | |
$this->saveGalleriesList($con); | |
parent::saveEmbeddedForms($con, $forms); | |
} |
This file contains 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
class TestForm | |
{ | |
public function configure() | |
{ | |
// ... snip ... | |
$eForm = new SomeObjectEmbeddedForm($this->getObject()->SomeObject); | |
$this->embedForm('some_object', $eForm); | |
$this->validatorSchema->setPostValidator( |
This file contains 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
public function configureDoctrine(Doctrine_Manager $manager) | |
{ | |
$options = array('baseClassName' => 'myDoctrineRecord'); | |
sfConfig::set('doctrine_model_builder_options', $options); | |
} |
This file contains 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 | |
class ProjectConfiguration extends sfProjectConfiguration | |
{ | |
// ... | |
public function configureDoctrine(Doctrine_Manager $manager) | |
{ | |
$manager->setAttribute(Doctrine_Core::ATTR_QUOTE_IDENTIFIER, true); | |
} |
This file contains 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
<Directory "/www"> | |
# | |
# Possible values for the Options directive are "None", "All", | |
# or any combination of: | |
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews | |
# | |
# Note that "MultiViews" must be named *explicitly* --- "Options All" | |
# doesn't give it to you. | |
# |
This file contains 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
$this->executor->setExecutable($ffmpeg); | |
$this->executor->setArguments($args); | |
$this->executor->execute(); |
This file contains 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 | |
// ... snip ... | |
public function process(majaxMediaFileInfo $file_info, $new_width = null, $new_height = null, $crop_method = 'fit', $aspect_ratio = '16:9') | |
{ | |
$name = $file_info->getName(); | |
$sha1 = $file_info->getSha1(); | |
$path = $this->path_builder->render($sha1); | |
$full_path = sfConfig::get('app_majax_media_cache_dir').DIRECTORY_SEPARATOR.$path.DIRECTORY_SEPARATOR.$name; | |
if (!file_exists(sfConfig::get('app_majax_media_cache_dir').DIRECTORY_SEPARATOR.$path.DIRECTORY_SEPARATOR.$name)) |
OlderNewer