Ensures a title is present for the Kapost Object before writing
968117
protected function onBeforeWrite() {
        parent::onBeforeWrite();
        
        //If the title is not present make one from the translated singular name and the Kapost Reference ID
        $title=$this->Title;
        if(empty($title)) {
            $this->Title=$this->i18n_singular_name().': '.$this->KapostRefID;
        }
    }
170222
def submit_text(self, title, text):
        
        return self._reddit.submit_text(self.display_name, title, text)
466430
public function onBeforeWrite()
    {
        parent::onBeforeWrite();
        if (empty($this->Title)) {
            $type = $this->Type;
            switch ($type) {
                case 'URL':
                case 'Email':
                case 'Phone':
                    $this->Title = $this->getField($type);
                    break;
                case 'SiteTree':
                    $this->Title = $this->SiteTree()->MenuTitle;
                    break;
                default:
                    if ($this->getRelationType($type) == 'has_one' && $component = $this->getComponent($type)) {
                        $this->Title = $component->Title;
                    } else {
                        $this->Title = 'Link-' . $this->ID;
                    }
                    break;
            }
        }
    }
725087
def _title_uptodate(self,fullfile,pid,_title):
        """"""
        i=self.fb.get_object(pid)
        if i.has_key('name'):
            if _title == i['name']:
                return True

        return False
18826
def update_title(self, _, info):
        # type: (object, TitleInfo) -> None
        """"""
        with self._lock:
            self._block.meta.set_label(info.title)
872957
function name_save_pre($name)
	{
		// validate
		if( !isset($_POST['post_type']) || $_POST['post_type'] != 'acf' ) 
		{
			return $name;
		}
		
		
		// need a title
		if( !$_POST['post_title'] )
		{
			$_POST['post_title'] = 'Unnamed Field Group';
		}
		
		
        $name = 'acf_' . sanitize_title($_POST['post_title']);

        
        return $name;
	}
487357
def title(self, title):
        
        if title is None:
            raise ValueError("Invalid value for `title`, must not be `None`")
        if title is not None and len(title) > 128:
            raise ValueError("Invalid value for `title`, length must be less than or equal to `128`")
        if title is not None and len(title) < 1:
            raise ValueError("Invalid value for `title`, length must be greater than or equal to `1`")

        self._title = title
999262
def update(title: nil, description: nil, private: nil)
      params = {
        title:       title,
        description: description,
        private:     private
      }.select { |k,v| v }
      updated = JSON.parse(connection.put("/collections/#{id}", params).body)
      self.title = updated["title"]
      self.description = updated["description"]
      self
    end
1042954
def title(controller_name, model_name = controller_name.singularize)
      string = ''
      unless ['page', 'routing_error', 'my_accounts'].include?(controller_name)
        string << t("activerecord.models.#{model_name}") + ' - '
      end
      if controller_name == 'routing_error'
        string << t("page.routing_error") + ' - '
      end
      string << LibraryGroup.system_name + ' - Next-L Enju Leaf'
      string.html_safe
    end
1056787
def set_title(self, title: str, url: str = None) -> None:
        
        self.title = title
        self.url = url
957487
function writePrompt () {
        charm.position(1,1);
        charm.display('bright');
        charm.write(promptStart);
        charm.write(' ');
        charm.display('reset');
    }
697108
public function iShouldNotBeAbleToViewThePost($post_title)
    {
        try {
            $this->getContentFromTitle($post_title);
        } catch (UnexpectedValueException $e) {
            // This is expected to fail.
            return;
        }

        throw new RuntimeException(sprintf('[W811] Content "%s" exists, but it should not.', $post_title));
    }
1273604
def pre_save(self, model_instance, add):
        """"""
        value = socket.gethostname()
        setattr(model_instance, self.attname, value)
        return value
976270
def _print_title(self):
        
        if self.title:
            self._stream_out('{}\n'.format(self.title))
            self._stream_flush()
9686
def obtain_the_title(check = nil)
    	post = obtain_record(check)
    	render :inline => post.post_title if !post.blank?
    end
649068
def title(self, value: typing.Union[None, str]):
        
        if not self._project:
            raise RuntimeError('Failed to assign title to an unloaded project')
        self._project.title = value
1224009
public boolean updatePostTitle(long postId, final String title) throws SQLException {
      Connection conn = null;
      PreparedStatement stmt = null;
      Timer.Context ctx = metrics.updatePostTimer.time();
      try {
         conn = connectionSupplier.getConnection();
         stmt = conn.prepareStatement(updatePostTitleSQL);
         stmt.setString(1, title);
         stmt.setLong(2, postId);
         return stmt.executeUpdate() > 0;
      } finally {
         ctx.stop();
         SQLUtil.closeQuietly(conn, stmt);
      }
   }