I’m making a module to add video to an in home media converter – as a part of Drupal Development Company module set up I create a brand new content material sort known as “person video” which has a file subject as a part of it.
I must set this file subject so it saves to Drupal Development Company personal information listing, nonetheless I’m unable to take action. I can create Drupal Development Company content material sort and add Drupal Development Company file subject – however by no means handle to get Drupal Development Company add vacation spot to be personal.
Generally I’m able to change this through Drupal Development Company admin interface, however generally this selection is greyed out.
I’ve included Drupal Development Company code under and would be pleased about any help.
//Create Drupal Development Company file add for Drupal Development Company video to be transformed $field_name = 'uploaded_video'; // Create Drupal Development Company subject definition array. $subject = array( 'field_name' => $field_name, 'sort' => 'file', ); $subject = field_create_field( $subject ); // Create Drupal Development Company subject occasion definition array. $occasion = array( 'field_name' => $subject[ 'field_name' ], 'entity_type' => 'node', 'bundle' => 'user_video', 'description' => 'A subject for importing video and audio content material.', 'label' => 'Video to add', 'settings' => array( 'file_extensions' => 'mp4 avi wmv qti mov', 'uri_scheme' => 'personal', ), 'widget' => array( 'sort' => 'file', ), ); // Create an occasion of Drupal Development Company subject and bind it to Drupal Development Company bundle. field_create_instance($occasion)